-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parse PEG/BNF in pre_proces method as well fix nodejs loading
- Loading branch information
Nikos M
committed
Oct 30, 2015
1 parent
7bf3093
commit 3fea5c6
Showing
8 changed files
with
84 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,18 @@ | ||
var CodeMirrorGrammar = require("../build/codemirror_grammar.js").CodeMirrorGrammar; | ||
var CodeMirrorGrammar = require("../build/codemirror_grammar.js"); | ||
var vm = require("vm"), fs = require("fs"), echo = console.log; | ||
|
||
function require_js( path, context ) | ||
{ | ||
context = context || {}; | ||
var data = fs.readFileSync( path ); | ||
vm.runInNewContext(data, context, path); | ||
return context; | ||
} | ||
|
||
var grammar = require_js('./grammars/json.js'); | ||
|
||
//echo( CodeMirrorGrammar.VERSION ); | ||
//echo( grammar.xml_grammar ); | ||
echo( JSON.stringify(CodeMirrorGrammar.pre_process( grammar.json_grammar ), null, 4) ); | ||
|
||
console.log(CodeMirrorGrammar.VERSION); | ||
|
||
console.log("CodeMirrorGrammar.getMode: " + ((CodeMirrorGrammar.getMode) ? true : false)); |