|Looking for BNF notation for Visual Basic and Java email@example.com (Emilio Collar, Jr.) (2002-09-03)|
|Re: Looking for BNF notation for Visual Basic and Java firstname.lastname@example.org (Jeremy Yallop) (2002-09-08)|
|Re: Looking for BNF notation for Visual Basic and Java email@example.com (Scott Nicol) (2002-09-08)|
|Re: Looking for BNF notation for Visual Basic and Java firstname.lastname@example.org (Scott Nicol) (2002-09-12)|
|From:||"Scott Nicol" <email@example.com>|
|Date:||8 Sep 2002 22:36:20 -0400|
|Posted-Date:||08 Sep 2002 22:36:20 EDT|
"Emilio Collar, Jr." <firstname.lastname@example.org> wrote in message
>I am looking for a source(s) for the Backus-Naur Form notation for
>Visual Basic and Java.
As the moderator wrote, java is easy - just take a java YACC grammar and
translate to BNF.
As for VB, there may be two answers.
At a previous job I wrote a VB clone. This was kept current, from VB2
through VB6. When I originally wrote it, I had to reverse-engineer the VB2
grammar from writing sample programs - you can't trust the manual, it's
often wrong. It took a lot of effort to get this particular grammar
written, because the grammar has a lot of hard-to-parse constructs. Given
this, and the fact that VB6 is a development from an adhoc parser (previous
versions of VB, which are based on qbasic, which is based on Microsoft PC
basic, which is based on Microsoft basic), I'd venture a guess that a BNF
for VB6 does not exist, even deep in the bowels of Microsoft.
VB.net might be a different animal. Although I never wrote a clone of this,
the reports (and complaints!) from users indicate that Microsoft took out a
lot of the funky hard-to-parse stuff, which might mean that Microsoft
started from scratch and wrote a yacc-able parser for this beast. Obtaining
the BNF might not be so easy, though...
Return to the
Search the comp.compilers archives again.