-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Right now, our project can only handle grammars that are described by terminals and non-terminals that have, each one, one char for its identification, such as S -> aSa | bSb | a | b. However, for enhancing software robustness, it would be nice to enable parsing of grammars that have more complex forms, such as:
E -> TE'
E' -> ∨TE' | &
T -> FT'
T' -> ∧FT' | &
F -> ¬F | id
Note that, apart from having E' as a non-terminal, this grammar has also id as one of its terminals. The presented grammar is LL(1).
An approach would be changing the productions rules for grammars, from {'E', 'TE'} to {'E', ['T', 'E'']}. Thus, pattern matching needs to be implemented and appended at the parsing process.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request