I know that there are several posts with a similar headline. Most links to a dead site - and I have a more specific question.
I am trying to convert EBNF to XPath specification for direct BNF so that I can easily create a Bison compatible grammar file.
Some time has passed since I did this, and I donβt remember which side the recursion is coming from. I thought it was left, but my "direct" translation gives me syntax errors with XPath simple phrase expressions when they are run through a Bison-processed parser.
So, if someone can humor me and weigh me - therefore I do not pursue a ghost:
In the Expr rule below:
Expr::= ExprSingle ("," ExprSingle)*
Is this the correct translation? (putting recursion on the left):
Expr::= Expr "," ExprSingle | ExprSingle
source share