A formal grammar is a set of production rules that describe how to form strings of valid syntax. Formal grammars are most often used to specify the syntax of a programming language.

learn more… | top users | synonyms

3
votes
2answers
52 views

Perl 6: Grammar issues (simple defines)

My goal is to parse defines in Objective-C code: ...
4
votes
1answer
399 views

PEG.js grammar for parsing CSS selectors

I have a library that's parsing some expressions, part of which is a CSS selector. More accurately, it's a jQuery-compatible selector. The selector itself is opaque to my library - I don't need to ...
2
votes
1answer
121 views

Expanding a synchronous grammar

Background: A synchronous grammar is a like two context-free grammars connected in parallel. It is used for translation. For example, here is a small synchronous grammar that can be used for ...