hoa: allow dots in identifiers

As discussed at https://github.com/adl/hoaf/issues/56

* src/parseaut/scanaut.ll: Allow dots.
* src/tests/parseaut.test: Test it.
* NEWS: Mention it.
This commit is contained in:
Alexandre Duret-Lutz 2015-12-02 15:28:05 +01:00
parent c60c117714
commit e357c0c5bc
3 changed files with 15 additions and 11 deletions

View file

@ -44,7 +44,7 @@ static unsigned lbtt_states = 0;
eol \n+|\r+
eol2 (\n\r)+|(\r\n)+
eols ({eol}|{eol2})*
identifier [[:alpha:]_][[:alnum:]_-]*
identifier [[:alpha:]_][[:alnum:]_.-]*
%x in_COMMENT in_STRING in_NEVER_PAR
%s in_HOA in_NEVER in_LBTT_HEADER
@ -131,7 +131,7 @@ identifier [[:alpha:]_][[:alnum:]_-]*
yylval->str = new std::string(yytext, yyleng - 1);
return token::HEADERNAME;
}
"@"[[:alnum:]_-]+ {
"@"[[:alnum:]_.-]+ {
yylval->str = new std::string(yytext + 1, yyleng - 1);
return token::ANAME;
}