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

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -