Re: [cedet-semantic] Is there a wisent analog to Bison %empty non-empty rule?
Brought to you by:
zappo
|
From: Christian J. <chr...@cv...> - 2020-06-15 10:51:15
|
Ok thanks, I’ll check it out. I’ll consider what alternative is the most feasible.. maybe a reduced grammar would be good enough to spot syntax errors in a buffer Regards Christian > 15 juni 2020 kl. 11:42 skrev Stephen Leake <ste...@st...>: > > Christian Johansson <chr...@cv...> writes: > >> Alright, I don’t just want to create tags, I would like to build a >> complete AST equivalent of the PHP AST. Can you improve the Wisent >> parser to fully support GNU Bison? Or is there a work-around I can use >> to make the gramnar work? > > You can use the GNU ELPA wisi package; it provides an error correcting > LR grammar generator and parser (equivalent to Bison, possibly better > error correction). It does not provide the AST to elisp (the AST is used > internally to compute indentation, navigation, faces), but it would be > straight-forward to add that. It does provide parse errors to elisp, as > both a text message and edit instructions. > >> Ideally I would like to spot code parser errors in Elisp without >> having to run the code via a PHP runtime executable. > > The wisi parser is implemented in Ada and runs in a background process; > I'm not clear if that is better than running PHP in a background process. > > -- > -- Stephe |