forked from GitHub/gf-core
more comments
This commit is contained in:
@@ -9,9 +9,13 @@ mkAPI().then((pgf) => {
|
||||
console.log('arity', expr.arity());
|
||||
|
||||
pgf.readPGF("Foods.pgf").then((gr) => {
|
||||
// Print its name
|
||||
// Print the grammar name
|
||||
console.log(gr.abstractName);
|
||||
|
||||
// Access a language and print the concrete name
|
||||
console.log(gr.languages["FoodsEng"].name);
|
||||
|
||||
// Linearize an expression
|
||||
console.log(gr.languages["FoodsEng"].linearize(expr));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user