rochus-keller / EbnfStudio

EbnfStudio can be used to edit and analyze EBNF grammars.
GNU General Public License v2.0
62 stars 10 forks source link

Support for expanding "..." #3

Closed shujaatak closed 6 months ago

shujaatak commented 2 years ago

Let suppose one write the following:

letter ::= 'A' ... 'Z' | 'a' ... 'z'

then some feature for expanding it automatically in EbnfStudio would be so awesome!

Example:

digit ::= '0' ... '9'

expanded to:

digit ::= '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
rochus-keller commented 2 years ago

That looks like a typical lexer production. EbnfStudio is only a parser generator tool, useful for LL(1) grammars with LL(k) exceptions.