hi!

> Le 8 févr. 2019 à 12:39, Peng Yu <pengyu...@gmail.com> a écrit :
> 
> On Thu, Feb 7, 2019 at 11:49 PM Akim Demaille <a...@lrde.epita.fr> wrote:
> 
>> I'm a bit confused here: did you really mean "another parser", or did
>> you mean "another scanner"?  If you do mean "another parser", I'm not
>> sure how you would coordinate the several layers.
> 
> 
> Probably it should be another scanner. I only has a vague idea and I don’t
> know what will the implementation details.

I have not studied carefully how the heretics are parsed, so I might
have said naive things.

> I’d like to know what is the best way to structure the parsing code. Given
> a lot of code of bash started 30 years ago, I’d expect at least some part
> of the code is not the  best according to today’s standard. I’d like to
> know anything that can improve it.

For a start, I don't understand why so much of the code is written
in K&R.  I find this amazing.  Besides, it uses a parser generator
that has dropped K&R for ages.  So honestly, if you are cleaning
up bash, I would first move its C to 1990.

Then in the grammar, I would also use the literal string aliases:
IMHO the grammar file is much easier to read, and the error messages
are expected to be nicer too.


_______________________________________________
help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to