[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 08:22:48 +0100


I believe tree-sitter is not suitable for proper parsing (it does not support 
LR(1) for example)

It is good for fast syntax coloring with approximate / good enough parsing


> 28 nov. 2021 kl. 08:02 skrev Eli Zaretskii <eliz@gnu.org>:
>> Date: Sat, 27 Nov 2021 22:40:45 +0100
>> From: Christian Johansson <christian@cvj.se>
>> I have started on a parser generator library for Emacs that currently 
>> can generate canonical LR(k) parsers as stand-alone elisp files. I'm 
>> using it for the automatically generated PHP 8.0 parser in phps-mode. A 
>> difference between my library and the built-in Wisent parser generator 
>> is that it can handle e-identifiers (like %empty), context sensitive 
>> precedence (like %prec) and global precedence rules (not sure if Wisent 
>> does support that)
>> In the future I have planned on implementing more parsing algorithms in 
>> this library like LL(k) and LALR(k)
> Thanks.  I believe the plan is to use Tree-sitter for the jobs for
> which a parser is needed.  But we also want to have an API that could
> accommodate other parsers into the same framework.  So I think it
> would be good if you cooperate with Yuan Fu <casouri@gmail.com>, who
> is working on Tree-sitter integration, so that the API for using a
> parser could be a common one.

reply via email to

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