Skip to content

Latest commit

 

History

History
31 lines (19 loc) · 1.12 KB

File metadata and controls

31 lines (19 loc) · 1.12 KB

spectrum parser

Note

This is an outdated, experiment project, from my early career.
Have improved significantly, since then. (https://xiggfi.web.app)


#spectrum parser

This is an experimental parser created as a learning exercise.

A parser for expressions based languages with an html visualization: View it in action at: (code is editable. Press button to parse it.) xzzulz.github.com/spectrum
(the visualization in the link may be slightly out of date, respect to the master branch)

MIT license.

Simple expressions grammar

A simple expressions grammar is a grammar defined in identities and operators. Expressions are constructed based on identities and operator rules. A single identity is a valid expression. Operators are combinators element, that can form valid expressions by combining with identities:

  • identities: symbols that are valid expression by itself.

  • operators: symbols that combines with identities or expressions to form valid expressions.