grammars-v4 icon indicating copy to clipboard operation
grammars-v4 copied to clipboard

PlSqlLexer.g4 supporting SQLPlus commands as parser Rules

Open chandra-kambham opened this issue 4 years ago • 0 comments

Currently, the SQL Plus commands (prompt, spool, etc) are written using Lexer Rules such that any line starts with PROMPT till EOL it matches to a Lexer token, but if some other DDL/DML using PROMPT as an identifier the parsing of those sql fails. for ex:

create table test(
PROMPT varchar2(111),
SPOOL  varchar2(111) 
);

Is there any way we can change these to parser rules instead of lexer rules to avoid the above use-case?

chandra-kambham avatar Sep 27 '21 07:09 chandra-kambham