Skip to main content
100%

grammar pseudo language

✓ Published0🌍 Public
GGerHobbelt
Last edited Jan 1, 2018
Created on Jan 1, 2018

This visualization shows the grammar rules of a custom programming pseudo-language as defined in a Jison specification file. It uses Jison’s `%lex` and `%ebnf` sections to declare lexical tokens (e.g., `NUMBER`, `PRINTLN`) and a grammar for mathematical expressions, functions, assignments, and print statements. The example includes semantic actions in JavaScript that return computed values or generated code strings, and a custom `parser.main` function tests two sample inputs by calling `parser.parse()`. The source is a GitHub gist by GerHobbelt.

AI-generated description

Similar vizzes