1

Say I have this in BNF:

a ::= b {c}
    | d {e}

Is there any way to translate to Gold-Parser? Without breaking it up like this:

<a> ::= <b> <c>

<c> ::= 
    | <c> terminal

Side Note: If anybody has a better title/more tags, please edit it, thanks!

Wilhelm Sorban
  • 1,012
  • 1
  • 17
  • 37

1 Answers1

1

Is there any way to translate to Gold-Parser? Without breaking it up

No, it doesn't support the repetition operator ({x}) as part of rule definitions, so you must encode it with multiple rules.

See also Converting EBNF to BNF

Community
  • 1
  • 1
npostavs
  • 4,877
  • 1
  • 24
  • 43