[Top][All Lists]
[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 19:54:31 +0200 |
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
- RE: BISON To Represent BASIC Grammer, Senthil Manickavasagam, 2004/04/14
- 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