I have a grammar that I don’t know what type of parser I need in order to parse it, except that I do not consider LL grammar (1). I think I need a retreat parser or LL (*). The grammar I came across (which may require rewriting):
S: Rules Rules: Rule | Rule Rules Rule: id '=' Ids Ids: id | Ids id
The language I'm trying to create looks something like this:
abc = def g hi jk lm xy = aaa bbb ccc ddd eee fff jjj kkk foo = bar ha ha
A zero or larger rule containing a left identifier, followed by an equal sign, followed by one or more identifiers. The part that, I think, would be a problem with writing the parser, is that the grammar allows any number of id in the rule and that the only way to say when the new rule starts is when it finds id =, which will require a return.
- ?
, , , , . , DFA . LL (*) .
, , Id = U {a: a ∈ Γ}, Γ ⊂ Σ - , . , ,
Γ = {a, b,..., z}, :
. , DFA .
R. R * DFA, R *. NFA, R * , . NFA DFA, . DFA R *. DFA , - ,
DFA. , , . , , , . langauge (, langauge), .