Class Index | File Index

Classes


Class mmir.env.grammar.PegJsGenerator


Defined in: pegjsGenerator.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Generator for executable language-grammars (i.e.
Field Summary
Field Attributes Field Name and Description
 
The name/ID for the compile engine for the PEG.js compiler
Method Summary
Method Attributes Method Name and Description
 
Class Detail
mmir.env.grammar.PegJsGenerator()
Generator for executable language-grammars (i.e. converted JSON grammars).

This generator uses PEG.js for compiling the JSON grammar.

The generator for compiling the JSON grammar definitions in www/config/languages/<language code>/grammar.json can be configured in www/config/configuration.json:

{
  ...
  "grammarCompiler": "pegjs",
  ...
}

PEGjs supports grammar generation for: PEG (Parsing Expression Grammar) NOTE: PEG is a different formalism than "classical" context-free grammar definitions/formalisms; see also explanation of PEG in Wikipedia

Requires:
PEG.js
jQuery.Deferred
jQuery.extend
jQuery.makeArray
See:
PEGjs homepage at http://pegjs.majda.cz/
Field Detail
PegJsGenerator#engineId
The name/ID for the compile engine for the PEG.js compiler
Method Detail
{Deferred} PegJsGenerator#init(callback)
Parameters:
{Function} callback Optional
OPTIONAL the callback that is triggered, when the engine is initialized
Returns:
{Deferred} a promise that is resolved, when the engine is initialized (NOTE: if you use the same function for the callback AND the promise, then the function will be invoked twice!)

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Feb 26 2016 21:44:43 GMT+0100 (Mitteleuropäische Zeit)