The Wayback Machine - http://web.archive.org/web/20200611003131/https://github.com/topics/lalr
Skip to content
#

lalr

A grammar describes the syntax of a programming language, and might be defined in Backus-Naur form (BNF). A lexer performs lexical analysis, turning text into tokens. A parser takes tokens and builds a data structure like an abstract syntax tree (AST). The parser is concerned with context: does the sequence of tokens fit the grammar? A compiler is a combined lexer and parser, built for a specific grammar.

Here are 31 public repositories matching this topic...

felixvuo
felixvuo commented Dec 18, 2019

I think it would be nice to have the option to dump a raw graphviz DOT file instead of the sppf.png for a few reasons:

  • the file size is a lot smaller
  • it's nice to be able to "do things" with the resulting tree in its structured form, rather than navigate the rendered bitmap
  • it's only one extra (or no extra) line and could be optional, e.g. if you've turned on "debug" mode.

Any though

chenl
chenl commented Oct 24, 2018

in docs/actions/#built-in-actions you write:

collect_optional - Can be used for rules of the form
Elements: Elements Element | Element | EMPTY;
Returns list;

Shouldn't that be Elements: Elements Element | EMPTY;?
This pattern is also in docs/grammar_language#zero-or-more

collect_sep_optional - Can be used for rules of the form
`Elements: Elements separator Ele

You can’t perform that action at this time.