diff --git a/src/runtime/javascript/test-web.js b/src/runtime/javascript/test-web.js index e32f64069..6f881f7ef 100644 --- a/src/runtime/javascript/test-web.js +++ b/src/runtime/javascript/test-web.js @@ -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)); }); });