A string is being returned from the lexer, and since it's not a reference, trying to dereference it is an error. Maybe you want:
! ref($token)But then the lexer is still returning too many TEXT tokens (line 2 and 3 of the output in the OP), so something else needs to be fixed. (update: and I think the fixing needs to be done in HOP::Lexer)(update2: nope, it was the TEXT regex that needed to be fixed)
In reply to Re^2: Using HOP::Lexer to parse a document
by runrig
in thread Using HOP::Lexer to parse a document
by monsterzero
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |