[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: I found program for AST generating
From: |
Askar Safin |
Subject: |
Re: I found program for AST generating |
Date: |
Wed, 29 Sep 2021 05:27:31 +0300 |
Hi. Please, CC me when answering, I'm not subscribed to bug-bison.
I didn't use BNFC, so I recommend directing questions to authors.
But it seems the project is good enough.
It has a lot of authors. And the authors use BNFC to teach parsing to students.
> Does it use the flex C++ lexer?
Using flex in C++ mode (i. e. using --c++ option to flex) is not recommended.
I. e. even for C++ you should run flex in C mode. I think I learned this from
bison docs, but now I cannot find that sentence.
I think BNFC is nearly perfect. The only reason why I decided not to use it is
this: BNFC doesn't guarantee reversibility (here is my bug report:
https://github.com/BNFC/bnfc/issues/360 ). But with good enough discipline it
is easy to achieve reversibility in BNFC. (As you can see I constructed very
artificial example to demonstrate bug.)
==
Askar Safin
http://safinaskar.com
https://sr.ht/~safinaskar
https://github.com/safinaskar