help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BISON To Represent BASIC Grammer


From: Hans Aberg
Subject: Re: BISON To Represent BASIC Grammer
Date: Wed, 14 Apr 2004 01:07:10 +0200

At 18:34 -0400 2004/04/13, Chris Cranford wrote:
>I am trying to write a BASIC-language script bytecode compiler.  Someone
>recommended that I use BISON in order to properly parse my .BAS and to
>generate my bytecode file.  Has anyone attempted this in the past or can
>offer some assistance?

If you do not get any suggestions in this list, I suggest you try the
newsgroup comp.compilers and its FAQ published there monthly. Also, Bison
just applies the LALR(1) parsing algorithm, so you might check if there is
already a open source BASIC compiler around with a .y grammar file. If all
that fails, the best way is to get hold of a BASIC grammar from some
standard, and then attempt to adapt it for use with an LALR(1) parser
generator. And you probably need Flex as well to generate the lexer, see
GNU links, and:
  Help-flex mailing list
  address@hidden
  http://mail.gnu.org/mailman/listinfo/help-flex

  Hans Aberg






reply via email to

[Prev in Thread] Current Thread [Next in Thread]