Thanks,
adding state to lexer seems to be the way to go.
2011/2/16 Mihai Maruseac mihai.marus...@gmail.com
On Wed, Feb 16, 2011 at 5:31 PM, Roman Dzvinkovsky romand...@gmail.com
wrote:
Hi,
using alex+happy, how could I parse lines like these?
mr username says message\n
where both
Hi,
using alex+happy, how could I parse lines like these?
mr username says message\n
where both username and message may contain arbitrary characters (except
eol)?
If I make lexer tokens
mr { T_Mr }
says { T_Says }
\r?\n{ T_Eol }
.{ T_Char $$ }
and parser
'mr '{
On Wed, Feb 16, 2011 at 5:31 PM, Roman Dzvinkovsky romand...@gmail.com wrote:
Hi,
using alex+happy, how could I parse lines like these?
mr username says message\n
where both username and message may contain arbitrary characters (except
eol)?
If I make lexer tokens
mr { T_Mr }
On 16 February 2011 15:31, Roman Dzvinkovsky romand...@gmail.com wrote:
using alex+happy, how could I parse lines like these?
mr username says message\n
Alex has both user states and powerful regex and character set
operators (complement and set difference), that said, LR parsing plus
Alex