regex - How to recognise start-of-line in an Antlr grammar? -
in language work with, keywords must @ start of line. because string values within language can go on multiple lines, , strings contain these keywords.
the old yacc/lex grammar implementation have deals because lexer uses normal regexes match text patterns, e.g.
^description { actions }
matches 'description' @ start of line , actions.
how can in antlr4? not appear support proper regex lexical matching. i'm using intellij plugin, , complains when use '^' character on lexer rule rhs.
Comments
Post a Comment