-
-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Hi Kate,
Thanks for writing this great tool!
Railroad Diagram Generator has an option to remove direct left recursion from a production. This is really great option to have when one wants to implementing a recursive descent parser for grammars that have a lot of left recursion such as C89 etc.
For example:
MULTIPLICATIVE_EXPRESSION ::=
CAST_EXPRESSION |
MULTIPLICATIVE_EXPRESSION '*' CAST_EXPRESSION |
MULTIPLICATIVE_EXPRESSION '/' CAST_EXPRESSION |
MULTIPLICATIVE_EXPRESSION '%' CAST_EXPRESSION
will be simplified to:
MULTIPLICATIVE_EXPRESSION
::= CAST_EXPRESSION ( ( '*' | '/' | '%' ) CAST_EXPRESSION )*
which also leads to a better understanding via the produced railroad diagram.
Would it be possible to add this as a feature?
Regards,
Niels.
katef
Metadata
Metadata
Assignees
Labels
No labels