Re: [stella] Atari 2600 BASIC compiler

Subject: Re: [stella] Atari 2600 BASIC compiler
From: "Fred Quimby" <c9r@xxxxxxxxxxx>
Date: Fri, 8 Jul 2005 16:22:48 -0400
You're right, I do know C but not perl, sed, awk or other language that 
might be easier.  I've only recently learned about lex/flex/yacc/bison and 
I've been reading up on them - I will definitely use these once I learn how. 
  If someone can help to get me started, that would be great - to start, I'd 
like to know how to get a parser going with these tools that accepts the 
line number, then a valid keyword or variable declaration for now so I can 
get a feel for how these tools work.

I've also thought about fixed point math.  I could set aside a few 
variables, or require them to be declared this way.  They would use one byte 
for the whole number and another byte for the decimal - they would be useful 
for fractional movement of objects across several frames.  I also plan to 
allow one to use any variable instead of just a-z, I just need to figure out 

> > One comment...I did glance at the source. I know everyone writes in
> > the language they are most comfortable with, but I suspect C isn't the
> > easiest thing to do this kind of parsing in. (Of course somehow I got
> > my compsci degree without taking the usual "compilers" course, so I
> > know stuff like yacc is out there but all I know is Perl and Java)
> > But I guess the difficulty of C is apparent to the user, since it's
> > pretty fragile with one space breaking things. It might be possible to
> > extract some of the cool work you've done and put it into something
> > that has more powerful "tokenizer" abilities.
>If the language is expected to become more advanced as time goes, I would
>concur that a nice lex/yacc parser might be a good way to go.  flex and
>bison are readily available for everyone, and I could help get you started
>if you like.
>By the way, I really like the idea and hope to get to try out the compiler
>Archives (includes files) at
>Unsub & more at

Archives (includes files) at
Unsub & more at

Current Thread