This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

backtracking yacc


Hi,
     I was interested by the plan to replace the C++ parser with a hand-crafted
recursive descent one.   Seemed to be a change in perspective from when I read
the original Dragon book many years back, but my expertise is no deeper than a
cursory read of that so I've not got anything to contribute.

But my attention was grabbed some time earlier this year though by "BackTracking
Yacc"   http://www.siber.org/btyacc,  and just thought I'd mention it in case it
was of possible use as maybe an alternative solution

From the readme:

> BTYACC is a modified version of yacc that supports automatic backtracking and
semantic disambiguation to parse ambiguous grammars...

>  BTYACC was originally written to make it easy to write a
>  C++ parser (my goal was to be able to use the grammar out
>  of the back of the ARM with as few modifications as
>  possible).  Anyone who has ever looked at Jim Roskind
>  public domain C++ yacc grammar, or the yacc-based grammar
>  used in g++ knows how difficult this is.

It may be that this doesn't help with any of the things that Gaby and Mark
mentioned as desirables  - better error messages and so on.   But just in case
it's of interest...

Anthony




This communication is for informational purposes only.  It is not intended as
an offer or solicitation for the purchase or sale of any financial instrument
or as an official confirmation of any transaction. All market prices, data
and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein
do not necessarily reflect those of J.P. Morgan & Co. Incorporated, its
subsidiaries and affiliates.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]