Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Basic Compiler > Re: BASIC gramm...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 14 Topic 75 of 149
Post > Topic >>

Re: BASIC grammar

by arargh403NOSPAM@[EMAIL PROTECTED] Mar 8, 2004 at 04:01 PM

On Tue, 09 Mar 2004 08:02:15 +1100, Johnathan
<zork_666@[EMAIL PROTECTED]
> wrote:

<snip>
>
>I was thinking of grabbing a copy of the ISO BASIC standard, but I 
>suspect the grammar is in a form suitable for a LALR parser generator 
>and it would probably be too much for me to handle at this early stage. 
I bought a copy of the Standard in order to figure out if I could get
BCET to comply.  The Standard is a .PDF of scanned pages with the text
OCR'ed (but never edited - it has errors) for searching purposses.
The PDF is 20 meg, and the actual text is about 600k.

>  Now that you mention it, I'll go with a small subset of BASIC.  That 
>seems like a much easier way to start.  I think I'll go with a subset 
>that does arithmetic expressions, has variable and constant 
>declarations, control structures and PRINT and INPUT.  From there I'll 
>go on to add arrays, subroutines and functions.  I'd like to work on the 
>code generation in a serious way, so the minimal subset makes a great 
>deal of sense.  Instead of creating a full and new dialect of BASIC with 
>a monster standard library and stuff, I'd like a smaller language so I 
>can spend more time on code generation.
There isn't too much that can be done in terms of code optimaztion.
Basic generally winds up doing so many library calls, that there isn't
much left to optimize.  Take a look at the intermediate files of a
BCET compile.
>
<snip>
>
>I'm pretty much doing this as a learning exercise and don't have any 
>plans to make this any kind of real compiler for everyday use.  But I do 
>have plans to get to that stage eventually.  
Gee, that's where I was, 12 years ago.  

>I'd also like to write a 
>front end for GCC and learn the tree language and RTL that GNU uses as 
>an IR in the back end.

<snip>

-- 
Arargh403 at [drop the 'http://www.'
from ->] http://www.arargh.com
BCET Basic Compiler Page: http://www.arargh.com/basic/index.html

To reply by email, remove the garbage from the reply address.




 14 Posts in Topic:
BASIC grammar
Johnathan <zork_666@[E  2004-03-09 01:35:52 
Re: BASIC grammar
erewhon@[EMAIL PROTECTED]  2004-03-08 14:51:57 
Re: BASIC grammar
Johnathan <zork_666@[E  2004-03-09 04:52:32 
Re: BASIC grammar
"Stephen J. Rush&quo  2004-03-08 13:58:24 
Re: BASIC grammar
Johnathan <zork_666@[E  2004-03-09 08:02:15 
Re: BASIC grammar
arargh403NOSPAM@[EMAIL PR  2004-03-08 16:01:11 
Re: BASIC grammar
Johnathan <zork_666@[E  2004-03-09 19:16:56 
Re: BASIC grammar
arargh403NOSPAM@[EMAIL PR  2004-03-09 14:29:56 
Re: BASIC grammar
arargh403NOSPAM@[EMAIL PR  2004-03-10 02:14:26 
Re: BASIC grammar
arargh403NOSPAM@[EMAIL PR  2004-03-08 15:47:38 
Re: BASIC grammar
"Markku Alén" &  2004-03-08 23:30:26 
Re: BASIC grammar
Johnathan <zork_666@[E  2004-03-09 19:22:03 
Re: BASIC grammar
"Markku Alén" &  2004-03-21 02:31:17 
Re: BASIC grammar
"Scott Moore" &  2004-03-10 08:22:41 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri May 16 22:11:45 CDT 2008.