BNFC/bnfc — pull request #52 by joecrayne (2013-07-24 01:29:54+00:00)
Title: Fixed alex regex bug.

I wrote this patch to address an issue with how bnfc treats \n and \t codes in regular expressions destined for alex to parse.

token Word ( (char - [" \n\t=;<|'\"\\"])+ ) ;

Given the above statement, bnfc will generates the following incorrect regular expression in the alex input file...

($u # [\ \
\ \= \; \< \| \' \" \\]) + { tok (\p s -> PT p (eitherResIdent (T_Word . share) s)) }

It would be better, if it generated this instead:
($u # [\ \n \t \= \; \< \| \' \" \\]) + { tok (\p s -> PT p (eitherResIdent (T_Word . share) s)) }