[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New package emacs-parser-generator

From: Christian Johansson
Subject: Re: New package emacs-parser-generator
Date: Sun, 28 Nov 2021 14:45:40 +0100

Well the GLR(k) algorithm might find a nondeterminstic route route in the grammar that a LR(k) do not find, if I want to know if a code is syntatically correct I would test it against the same type of parser the language uses, that is a deterministic parser

  1. An intuitive structure - Tree-sitter’s output is a concrete syntax tree; each node in the tree corresponds directly to a terminal or non-terminal symbol in the grammar. So in order to produce an easy-to-analyze tree, there should be a direct correspondence between the symbols in your grammar and the recognizable constructs in the language. This might seem obvious, but it is very different from the way that context-free grammars are often written in contexts like language specifications or Yacc/Bison parsers.


    This is a big issue because each version of a language grammar would need to be converted into tred-sitter form

    But anyways I don't see the issue with pluralism in the parser generator space, why would one exclude the other?



28 nov. 2021 kl. 14:24 skrev Stefan Monnier <monnier@iro.umontreal.ca>:

Christian Johansson [2021-11-28 08:22:48] wrote:
I believe tree-sitter is not suitable for proper parsing (it does not
support LR(1) for example)

Really?  AFAIK it uses a GLR parser and hence handles LR(1) and more.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]