Re: Look for a LALR grammar for visual basic

genew@vip.net (Gene Wirchenko)
20 Aug 1997 23:56:32 -0400

          From comp.compilers

Related articles
Look for a LALR grammar for visual basic tsupplisson@suresnes.marben.fr (Thierry Supplisson) (1997-08-16)
Re: Look for a LALR grammar for visual basic thetick@scruz.net (Scott Stanchfield) (1997-08-19)
Re: Look for a LALR grammar for visual basic genew@vip.net (1997-08-20)
Re: Look for a LALR grammar for visual basic jrr@atml.co.uk (1997-08-24)
Re: Look for a LALR grammar for visual basic thetick@magelang.com (Scott Stanchfield) (1997-09-07)
Re: Look for a LALR grammar for visual basic genew@vip.net (1997-09-12)
| List of all articles for this month |

From: genew@vip.net (Gene Wirchenko)
Newsgroups: comp.compilers
Date: 20 Aug 1997 23:56:32 -0400
Organization: All USENET -- http://www.Supernews.com
References: 97-08-050 97-08-052
Keywords: Basic, parse

Scott Stanchfield <thetick@scruz.net> wrote:


[snip]


>Unfornately, my NDA with them prevents me from saying much more about
>it... I think I can say that it was a fairly nasty beast in some areas:
>Think about
>
> IF x = 1 THEN
> END
> 100: END IF
>
>which would complicate a grammar significantly (yes, VB allows a label
>on things like "END IF" -- yuck!


          If you're going to allow goto, it makes sense to me to allow a
branch to the end of a block (from within the block only I hope).
Consider the equivalent in C:
                                        if (x==1)
                                              {
                                              exit(EXIT_SUCCESS);
                    target: }


          You could say that there is a null statement before the } and
that may be so. (I'm not up on the Standard sufficiently to be sure.)
In that case, it's so in the BASIC example, too.


[snip]


Sincerely,


Gene Wirchenko
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.