-
Notifications
You must be signed in to change notification settings - Fork 66
Grammar Examples
PhilippeSigaud edited this page Apr 8, 2012
·
21 revisions
To show how to create a grammar and to see what Pegged can manager, I added a /examples/
directory containing, as of this writing, the following grammars.
These grammars have about a dozen rules (say, from 5 to 20 rules):
About 20 - 100 rules:
I'll call large grammars that have hundreds of rules:
-
A C grammar. The ISO standard gives one.
-
A more complete XML grammar (the standard grammar is an 80-rules medium-size grammar)
-
The Javascript grammar, probably (I'm not so sure about
-
printf
/writef
format grammar: a nice example of a small DSL.