Open sl45sms opened 10 years ago
0.4.15 seems to ignore %start and always set parser as name
$ cat gl.y ..... ..... %start gl
/* language grammar */ %%
gl : stmt '.' { return {"groups":groups,"program":$1}; } ; .... ....
$ diff -u gl0.4.13.js gl0.4.15.js
-/* parser generated by jison 0.4.13 / +/ parser generated by jison 0.4.15 */
-var gl = (function(){ +var parser = (function(){ ..... ..... -exports.parser = gl; -exports.Parser = gl.Parser; -exports.parse = function () { return gl.parse.apply(gl, arguments); }; +exports.parser = parser; +exports.Parser = parser.Parser; +exports.parse = function () { return parser.parse.apply(parser, arguments); };
Thanks. The name isn't determined by %start but rather by the name of the grammar file, but you are correct that it's currently broken. On it!
%start
a ok,i've had misunderstanding this! Thanks!
0.4.15 seems to ignore %start and always set parser as name
$ cat gl.y ..... ..... %start gl
/* language grammar */ %%
gl
: stmt '.' { return {"groups":groups,"program":$1}; } ; .... ....
$ diff -u gl0.4.13.js gl0.4.15.js
-/* parser generated by jison 0.4.13 / +/ parser generated by jison 0.4.15 */
-var gl = (function(){ +var parser = (function(){ ..... ..... -exports.parser = gl; -exports.Parser = gl.Parser; -exports.parse = function () { return gl.parse.apply(gl, arguments); }; +exports.parser = parser; +exports.Parser = parser.Parser; +exports.parse = function () { return parser.parse.apply(parser, arguments); };