xref: /freebsd/usr.bin/lex/version.awk (revision d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf)
1ab76bc97SJung-uk Kim
2ab76bc97SJung-uk KimBEGIN {
3ab76bc97SJung-uk Kim	FS = "[ \t\.\"]+"
4ab76bc97SJung-uk Kim}
5ab76bc97SJung-uk Kim
6ab76bc97SJung-uk Kim{
7ab76bc97SJung-uk Kim	if ($1 ~ /^#define$/ && $2 ~ /^VERSION$/) {
8*7e382390SJung-uk Kim		printf("%s.%s.%s\n", $3, $4, $5);
9ab76bc97SJung-uk Kim	}
10ab76bc97SJung-uk Kim}
11