Re: [cedet-semantic] Wisent grammars and bison
Brought to you by:
zappo
From: Stephen L. <ste...@st...> - 2013-04-03 12:50:53
|
David Engster <de...@ra...> writes: > To followup on that: The grammars for LL (Bovine) and LALR > (Wisent/Bison) are not much different syntactically. A few months ago I > tried porting the C++ grammar from Bovine to Wisent, and while I could > get Bison to accept it, it had a *lot* of conflicts. I'm not very > familiar with grammars, parsers and all that, but it seems that LL > parsers are more robust against such conflicts than LALR ones (top-down > vs bottom-up). There is now another option. For parsing Ada, I've written a generalized LALR parser, using wisent as a starting point. It's still beta code; see http://stephe-leake.org/emacs/ada-mode/emacs-ada-mode.html, the section on Ada mode 5.0 A "generalized" parser handles a conflict by spawning another parser, and following both paths until one errors out. So far it's working well, but I haven't put in all of Ada yet, so I'm not sure how fast it will ultimately be. -- -- Stephe |