Recursive descent parsing for grammars with contexts
Recursive descent parsing for grammars with contexts
Recursive descent parsing for grammars with contexts
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Grammars <strong>with</strong> <strong>contexts</strong> (B, Okhotin, 2012)A → α 1 & . . . & α k & ✄β 1 & . . . & ✄β m & γ 1 & . . . & γ nGiven a string x = u w v:each α i defines weach β i defines v (the right context of w)each γ i defines wv (the extended right context of w)Semantics by logical deduction of elementary propositions[X , 〈w〉v] : “a string w written in right context v has the property X ”{a n b n c} ∪ {a n b 2n d}S → Ac | BdA → aAb | ε L(A) = {a n b n }B → aBbb | ε L(B) = {a n b 2n }the language is not standard LL(k) <strong>for</strong> any kway out: use right <strong>contexts</strong> to peek the last symbol of the stringMikhail Barash<strong>Recursive</strong> <strong>descent</strong> <strong>for</strong> <strong>grammars</strong> <strong>with</strong> <strong>contexts</strong>