Questions tagged [jison]

A parser generator for JavaScript.

Jison produces a parser from a context-free grammar.

Highlights:

  • Close compatibility with bison, lex and yacc grammars for lexer and parser definitions.
  • As the parsers it generates are plain JavaScript, they can be embedded in a web page executing inside the browser (similarly to OmetaJS, in that regard).

Resources:

Note:
There is the original Jison (AKA Vanilla Jison) that has not been updated lately and the GitHub GerHobbelt fork that is actively maintained.

139 questions
0
votes
1 answer

Expression AST Parser from Expression Interpreter demo

I'm trying to modify this "Calculator" Jison example to be an expression parser rather than an expression interpreter. I want to output a JSON object that describes the expression instead of immediately evaluating it. I attempted to modify the…
Jason Kleban
  • 20,024
  • 18
  • 75
  • 125
-1
votes
1 answer

Getting tokens based on length and position inside input

On my input I have stream of characters which are not separated by any delimiter, like this: input = "150001" I want to make parser(using JISON), which tokenize based on position and length, this should be my tokens: 15 - system id (first 2…
dixpac
  • 533
  • 2
  • 10
-2
votes
1 answer

How to include a Jison generated parser into angular?

With the Jison library one can generate parsers given a specific grammar like: $ jison calculator.jison As stated in [1] . That would generate a parser calculator.js. But how to include the generated parser calculator.js in an angular project? [1]…
mluis
  • 213
  • 2
  • 13
-5
votes
1 answer

How to include Jison into Angular?

How can one include the Jison javascript library into an angular project? At the moment I'm getting: WARNING in ./node_modules/jison/node_modules/source-map/lib/source-map/source-node.js 8:45-52 Critical dependency: require function is used…
mluis
  • 213
  • 2
  • 13
1 2 3
9
10