We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$ ls calc.jison $ cat calc.jison /* description: Parses end executes mathematical expressions. */ /* lexical grammar */ %lex %% \s+ /* skip whitespace */ [0-9]+("."[0-9]+)?\b return 'NUMBER'; "*" return '*'; "/" return '/'; "-" return '-'; "+" return '+'; "^" return '^'; "(" return '('; ")" return ')'; "PI" return 'PI'; "E" return 'E'; <<EOF>> return 'EOF'; /lex /* operator associations and precedence */ %left '+' '-' %left '*' '/' %left '^' %left UMINUS %start expressions %% /* language grammar */ expressions : e EOF {print($1); return $1;} ; e : e '+' e {$$ = $1+$3;} | e '-' e {$$ = $1-$3;} | e '*' e {$$ = $1*$3;} | e '/' e {$$ = $1/$3;} | e '^' e {$$ = Math.pow($1, $3);} | '-' e %prec UMINUS {$$ = -$2;} | '(' e ')' {$$ = $2;} | NUMBER {$$ = Number(yytext);} | E {$$ = Math.E;} | PI {$$ = Math.PI;} ; $ npm install browserify brfs jison [...] $ node_modules/.bin/jison calc.jison $ node_modules/.bin/browserify calc.js -o bundle.js $ node_modules/.bin/browserify calc.js -o bundle.js -t brfs TypeError: Object #<Object> has no method 'apply' while parsing file: /tmp/test/calc.js at walk (/tmp/test/node_modules/brfs/node_modules/static-module/node_modules/static-eval/index.js:89:27) at walk (/tmp/test/node_modules/brfs/node_modules/static-module/node_modules/static-eval/index.js:92:23) at walk (/tmp/test/node_modules/brfs/node_modules/static-module/node_modules/static-eval/index.js:77:26) at walk (/tmp/test/node_modules/brfs/node_modules/static-module/node_modules/static-eval/index.js:85:25) at module.exports (/tmp/test/node_modules/brfs/node_modules/static-module/node_modules/static-eval/index.js:114:7) at traverse (/tmp/test/node_modules/brfs/node_modules/static-module/index.js:256:23) at walk (/tmp/test/node_modules/brfs/node_modules/static-module/index.js:208:13) at walk (/tmp/test/node_modules/brfs/node_modules/static-module/node_modules/falafel/index.js:49:9) at /tmp/test/node_modules/brfs/node_modules/static-module/node_modules/falafel/index.js:46:17 at forEach (/tmp/test/node_modules/brfs/node_modules/static-module/node_modules/falafel/node_modules/foreach/index.js:12:16) $
The text was updated successfully, but these errors were encountered:
+1 for this please
It works if I require jison and use that. However the generated parsers give the above error.
Sorry, something went wrong.
Can you explain in more detail what this problem is and what you are trying to solve? I'm not sure what jison is, or where the problem in brfs lies.
jison
brfs
Cheers 🍻
Can't reproduce with the latest browserify and brfs versions; please open a new issue if this is still relevant.
No branches or pull requests
The text was updated successfully, but these errors were encountered: