|
|
|
@ -15,9 +15,10 @@ function nop() {}
|
|
|
|
|
* metagrammar.pegjs file. The start rule may be unspecified, in which case
|
|
|
|
|
* "start" is used.
|
|
|
|
|
*
|
|
|
|
|
* Throws |PEG.Grammar.GrammarError| if the grammar contains an error. Note that
|
|
|
|
|
* not all errors are detected during the generation and some may protrude to
|
|
|
|
|
* the generated parser and cause its malfunction.
|
|
|
|
|
* Throws |PEG.grammarParser.SyntaxError| if the grammar contains a syntax error
|
|
|
|
|
* or |PEG.Grammar.GrammarError| if it contains a semantic error. Note that not
|
|
|
|
|
* all errors are detected during the generation and some may protrude to the
|
|
|
|
|
* generated parser and cause its malfunction.
|
|
|
|
|
*/
|
|
|
|
|
PEG.buildParser = function(grammar, startRule) {
|
|
|
|
|
startRule = startRule || "start";
|
|
|
|
|