Moved parser into main source folders

This commit is contained in:
Stefan Zermatten
2019-03-27 12:23:27 +02:00
parent 484b73d836
commit caf7f3efb9
10 changed files with 139 additions and 1342 deletions

View File

@@ -0,0 +1,8 @@
import grammar from '/imports/parser/grammar.js';
import nearley from 'nearley';
const nearleyGrammar = nearley.Grammar.fromCompiled(grammar);
export default function parser(){
return new nearley.Parser(nearleyGrammar);
}