python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
ANTLR4 - What is the correct way to define an array type?
I am creating my own grammar, and so far I had only primitive types. However, now I would like to add a new type by reference, arrays, with a format similar to Java or C#, but I run into the problem t...
MrKarrter
Votes: 0
Answers: 2
How to describe this event log in formal BNF?
I have a very simple event log format, just I'm having difficulties describing it in BNF (for gocc ).
Here is my simple event log format:
timestamp nested-event-A Running
timestamp Start of nested-eve...
xpt
Votes: 0
Answers: 2
Epsilon(ε) productions and LR(0) grammars and LL(1) grammars
At many places (for example in this answer here), I have seen it is written that an LR(0) grammar cannot contain ε productions.
Also in Wikipedia I have seen statements like: An ε free LL(1) grammar i...
Abhishek Ghosh
Votes: 0
Answers: 1
A simple CFG claimed to have no equivalent PEG, that seems to have one anyway
In "Packrat Parsing: a Practical Linear-Time Algorithm with Backtracking" on page 30 the author states that the context-free grammar (CFG):
S -> a S a | a S b | b S a | b S b | a
appears...
hkBst
Votes: 0
Answers: 1