in reply to Re^3: HOP::Lexer not doing what I expected
in thread HOP::Lexer not doing what I expected
Note that we need to place DQWORD before DQUOTED since the first is a subset of the second (everything first matches second will match). QUOTED can be before or after the double quoted rules. Still don't understand why WORD can't be the first one, though.[ DQWORD => qr/"\w+"/ ], [ DQUOTED => qr/"[^"]+"/ ], [ QUOTED => qr/'[^']*'/ ], [ WORD => qr/\w+/i ], [ COMMA => qr/,/ ], [ SPACE => qr/\s+/, sub {} ],
|
|---|