Allow [ ] characters in strings. They might be used in IPv6 addresses.

MFC after:	3 weeks
This commit is contained in:
Pawel Jakub Dawidek 2011-05-20 11:10:39 +00:00
parent bdbd046b35
commit 496a87aa30
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=222117

View File

@ -68,7 +68,7 @@ sha256 { DP; return SHA256; }
hole { DP; return HOLE; }
lzf { DP; return LZF; }
[0-9]+ { DP; yylval.num = atoi(yytext); return NUM; }
[a-zA-Z0-9\.\-_/\:]+ { DP; yylval.str = strdup(yytext); return STR; }
[a-zA-Z0-9\.\-_/\:\[\]]+ { DP; yylval.str = strdup(yytext); return STR; }
\{ { DP; depth++; return OB; }
\} { DP; depth--; return CB; }
#.*$ /* ignore comments */;