[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: BISON To Represent BASIC Grammer
From: |
Senthil Manickavasagam |
Subject: |
RE: BISON To Represent BASIC Grammer |
Date: |
Wed, 14 Apr 2004 14:41:57 -0400 |
Hans:
Looking at the number of questions on things like this...
may I suggest that we work on a small example of simplified BASIC that is
implemented using flex and bison
and put that on Bison page.
What do you think?
Senthil
-----Original Message-----
From: address@hidden
[mailto:address@hidden Behalf Of
Hans Aberg
Sent: Wednesday, April 14, 2004 1:55 PM
To: Chris Cranford
Cc: Hans Aberg
Subject: Re: BISON To Represent BASIC Grammer
At 21:12 -0400 2004/04/13, Chris Cranford wrote:
>Hans -
Don't forget to cc Help-Bison.
>I looked around a little more detailed since I knew what to be looking for
>and found a great post in a newsgroup where someone has put their yacc/flex
>implementation of a subset of BASIC in their post.
>
>I followed this as an example and thus far it seems to be working. So with
>that said, let me make sure I have an understanding of what I should do.
>
>1. Develop a way to pass the BASIC file's source to the yyparse()
> function and detect if the parse is successful or not.
>
>2. Once the syntax pass #1 is successful, then I need to develop a
> way to 'interpret' the code and generate a bytecode instruction
> list of the code and this bytecode should then be stored in a
> file.
>
>The the bytecode file will get used by the Virtual Machine in order to
>emulate/run the code ...
>
>Right?
People do this differently depending on what language one is working with.
For example, in comp.compilers, one recently suggested a assembler two-pass
approach: first set the labels, then generate the code. Other languages may
require only one pass.
Hans Aberg
_______________________________________________
address@hidden http://mail.gnu.org/mailman/listinfo/help-bison
- RE: BISON To Represent BASIC Grammer,
Senthil Manickavasagam <=
- RE: BISON To Represent BASIC Grammer, chris . cranford, 2004/04/14
- RE: BISON To Represent BASIC Grammer, Urdaneta, Alfonso E (N-Summitt Technologies), 2004/04/14
- RE: BISON To Represent BASIC Grammer, Urdaneta, Alfonso E (N-Summitt Technologies), 2004/04/15
- RE: BISON To Represent BASIC Grammer, chris . cranford, 2004/04/15