kaby76 / AntlrExamples

Some examples of parsing with Antlr
16 stars 7 forks source link

Can your PL/I grammar support no reserved words? #5

Open Korporal opened 1 year ago

Korporal commented 1 year ago

Can the Antlr PL/I grammar parse an assignment to a variable that has same spelling as a keyword? e.g


call = 100;

declare = 100;

goto = if;

/* and */

if if = else then
    else = then;
else
    then = if;

etc.

Also see this: https://github.com/antlr/antlr4/discussions/4018