MXS-1684 Match space+linefeed as linefeed

A linefeed is whitespace, so given the rules

  "\n"+    return '\n'
  {SPACE}  ;

a line consisting of space followed by a linefeed, will be matched
as space and not as a linefeed and hence will cause the parser to
barf.
This commit is contained in:
Johan Wikman 2018-02-27 18:50:18 +02:00
parent 0c206ff428
commit b46c52d65c

View File

@ -36,7 +36,7 @@ USTR [%-_[:alnum:][:punct:]]+
CMP [=<>!]+
%%
"\n"+ return '\n';
{SPACE}"\n"+ return '\n';
{COMMENT} return FWTOK_COMMENT;
deny|allow return FWTOK_DENY; /** This should be removed at some point */
rule return FWTOK_RULE;