Grammar for Visual Basic 
Author Message
 Grammar for Visual Basic

I am a 3rd year Software Engineering student at The University of
Birmingham (UK) and for my final year project (which is 25% of my final
mark for my course) I am writing a type checker for Visual Basic.

In order for me to be able to do this I need a formal grammar for VB,
unfortunately I have been unable to find one and so if anyone could help
me out either by sending me one, telling me where one is or just giving
suggestions as to where I may possibly find one and point me in the right
direction I would be very grateful, and obviously you would receive full
credit in my final dissertation.

Thank you in advance,
B.P. Niven-Jenkins



Wed, 18 Jun 1902 08:00:00 GMT  
 Grammar for Visual Basic
"B.P.Niven-Jenkins" wrote ...

Quote:
> In order for me to be able to do this I need a formal grammar for
> VB, unfortunately I have been unable to find one

I doubt one exists, since VB is clearly written using a recursive
descent parser.  Since so much of the VB syntax is either undocumented
or documented only in passing (items that come to mind immediately are
entire array parameters, VarPtr, StrPtr, and ObjPtr), I rather doubt
you will be able to generate an authoritative one.  On the other hand,
the statement level documentation is fairly good, so you should be
able to write a "good enough" grammar moderately easily.


Wed, 18 Jun 1902 08:00:00 GMT  
 Grammar for Visual Basic

Quote:

>I am a 3rd year Software Engineering student at The University of
>Birmingham (UK) and for my final year project (which is 25% of my final
>mark for my course) I am writing a type checker for visual basic.

>In order for me to be able to do this I need a formal grammar for VB,
>unfortunately I have been unable to find one and so if anyone could help
>me out either by sending me one, telling me where one is or just giving
>suggestions as to where I may possibly find one and point me in the right
>direction I would be very grateful, and obviously you would receive full
>credit in my final dissertation.

>Thank you in advance,
>B.P. Niven-Jenkins

You are studying about compilers?

So you can satisfy yourself look here- there is no
mention of your subject.
This is the FAQ and charter for this group...
http://www.landfield.com/ftp/faqs/visual-basic-faq/general-info

If you are strong in the *C* language, you might have better luck with
an open source language like PERL. Visual Basic source code is not
available on the Internet :)

www.perl.org

By the way, can you post a link to any formal grammar, for any language?
I'm curious to see one, thanks.

HTH,
    Mark Pryor



Wed, 18 Jun 1902 08:00:00 GMT  
 Grammar for Visual Basic
The best reference I found is the book
"VB and VBA in a NutShell - The Language"
Read a review of it on the books page at
http://www.gridlinx.com
...
George
GridLinx Software       Programming Tools for VB Programmers

Quote:

> I am a 3rd year Software Engineering student at The University of
> Birmingham (UK) and for my final year project (which is 25% of my final
> mark for my course) I am writing a type checker for visual basic.

> In order for me to be able to do this I need a formal grammar for VB,
> unfortunately I have been unable to find one and so if anyone could help
> me out either by sending me one, telling me where one is or just giving
> suggestions as to where I may possibly find one and point me in the right
> direction I would be very grateful, and obviously you would receive full
> credit in my final dissertation.

> Thank you in advance,
> B.P. Niven-Jenkins

--

Remove NOSPAM from address before replying.



Wed, 18 Jun 1902 08:00:00 GMT  
 Grammar for Visual Basic

Quote:

> By the way, can you post a link to any formal grammar, for any language?
> I'm curious to see one, thanks.

I do not know the actual address but I know that Sun have the formal
grammar to Java on their website

B.P.Niven-Jenkins



Wed, 18 Jun 1902 08:00:00 GMT  
 Grammar for Visual Basic
Other posters have said this was hard to find.   It is, because it is poorly
documented, probably on purpose, by Microsoft.

We do have a robust Visual Basic parser constructed empirically.
However, it is part of a commercial product, the DMS Reengineering Toolkit,
(see http://www.semdesigns.com/Products/DMS/DMSToolkit.html).

Other langauages, notably ISO Pascal and Java, should have grammars
easily found on the net.

If you are serious about the VB type checker, contact me privately.

--

Semantic Designs, Inc., www.semdesigns.com FAX 512-250-1191
12636 Research Blvd #C214, Austin, Texas 78759


Quote:
> I am a 3rd year Software Engineering student at The University of
> Birmingham (UK) and for my final year project (which is 25% of my final
> mark for my course) I am writing a type checker for visual basic.

> In order for me to be able to do this I need a formal grammar for VB,
> unfortunately I have been unable to find one and so if anyone could help
> me out either by sending me one, telling me where one is or just giving
> suggestions as to where I may possibly find one and point me in the right
> direction I would be very grateful, and obviously you would receive full
> credit in my final dissertation.



Wed, 18 Jun 1902 08:00:00 GMT  
 Grammar for Visual Basic

Quote:
>By the way, can you post a link to any formal grammar, for any language?
>I'm curious to see one, thanks.

I'm not sure exactly what you are talking about, but if you mean the
Specifications for programming languages, all the internet languages are at
http://www.w3c.org. And other languages might be at
http://www.microsoft.com. However, Microsoft's SDK's are not the official
specifications.


Fri, 06 Jun 2003 05:44:16 GMT  
 Grammar for Visual Basic
I have not seen the original article for this thread, but I had a related
topic in comp.compilers recently.
The consensus was that VB does not fall nicely into the models of "normal"
languages, but this topic is best discussed in comp.compilers, which is a
moderated newsgroup.

--
Please post your response to the newsgroup.

Quote:
> >By the way, can you post a link to any formal grammar, for any language?
> >I'm curious to see one, thanks.

> I'm not sure exactly what you are talking about, but if you mean the
> Specifications for programming languages, all the internet languages are
at
> http://www.w3c.org. And other languages might be at
> http://www.microsoft.com. However, Microsoft's SDK's are not the official
> specifications.



Fri, 06 Jun 2003 07:12:49 GMT  
 Grammar for Visual Basic

Who's interested in the models of "normal" languages?

The Volkswagen Beetle did not fall nicely into the models of "normal" motor
cars, and yet it sold in tens of millions!

Mike


Quote:
> I have not seen the original article for this thread, but I had a related
> topic in comp.compilers recently.
> The consensus was that VB does not fall nicely into the models of "normal"
> languages, but this topic is best discussed in comp.compilers, which is a
> moderated newsgroup.

> --
> Please post your response to the newsgroup.


> > >By the way, can you post a link to any formal grammar, for any
language?
> > >I'm curious to see one, thanks.

> > I'm not sure exactly what you are talking about, but if you mean the
> > Specifications for programming languages, all the internet languages are
> at
> > http://www.w3c.org. And other languages might be at
> > http://www.microsoft.com. However, Microsoft's SDK's are not the
official
> > specifications.



Fri, 06 Jun 2003 07:17:46 GMT  
 Grammar for Visual Basic
I'm not normal so I certainly wouldn't want to program with a normal
language!


Quote:

> Who's interested in the models of "normal" languages?

> The Volkswagen Beetle did not fall nicely into the models of "normal"
motor
> cars, and yet it sold in tens of millions!

> Mike



> > I have not seen the original article for this thread, but I had a
related
> > topic in comp.compilers recently.
> > The consensus was that VB does not fall nicely into the models of
"normal"
> > languages, but this topic is best discussed in comp.compilers, which is
a
> > moderated newsgroup.

> > --
> > Please post your response to the newsgroup.


> > > >By the way, can you post a link to any formal grammar, for any
> language?
> > > >I'm curious to see one, thanks.

> > > I'm not sure exactly what you are talking about, but if you mean the
> > > Specifications for programming languages, all the internet languages
are
> > at
> > > http://www.w3c.org. And other languages might be at
> > > http://www.microsoft.com. However, Microsoft's SDK's are not the
> official
> > > specifications.



Sat, 07 Jun 2003 05:05:13 GMT  
 Grammar for Visual Basic
I, too, saw the comp.compilers thread on VB, and simply chose not to speak
up.

In fact, VB isn't any weirder than any other "real" langauge.
It is true that conventional parsing tools such as YACC have
a bad time with VB, but in fact the problem is with YACC
being limited to LALR(1) langauges, when no "real" langauge
falls in that category.

We have a fine VB grammar and parser.
Not based on YACC.  The reason you don't see it floating around
is that the parsing technology was the hard part to build,
and it and the VB grammar together are part of a commercial product.
See http://www.semdesigns.com/Products/DMS/DMSToolkit.html

--

Semantic Designs, Inc.              web: http://www.semdesigns.com
12636 Research Blvd. C-214    voice: (512) 250-1018 x140
Austin, TX 78759-2200             fax: (512) 250-1191


Quote:
> I have not seen the original article for this thread, but I had a related
> topic in comp.compilers recently.
> The consensus was that VB does not fall nicely into the models of "normal"
> languages, but this topic is best discussed in comp.compilers, which is a
> moderated newsgroup.

> --
> Please post your response to the newsgroup.


> > >By the way, can you post a link to any formal grammar, for any
language?
> > >I'm curious to see one, thanks.

> > I'm not sure exactly what you are talking about, but if you mean the
> > Specifications for programming languages, all the internet languages are
> at
> > http://www.w3c.org. And other languages might be at
> > http://www.microsoft.com. However, Microsoft's SDK's are not the
official
> > specifications.



Sat, 07 Jun 2003 07:05:17 GMT  
 
 [ 11 post ] 

 Relevant Pages 

1. BNF Grammar for Visual Basic

2. Where or how can I get YACC grammar for Visual Basic

3. Visual Basic Grammar

4. yacc grammar for basic ?

5. Grammar for basic

6. BNF (Grammar) for BASIC

7. Grammar for Basic

8. do Visual Basic 6.0 and Visual Basic .NET version beta Working Both

9. Difference between Visual Basic 6 and Visual Basic.Net

10. Visual basic 4 to Visual basic 6

11. Visual Basic 3.0 to Visual Basic 6.0

12. Visual Basic 5 vs. Visual Basic 6

 

 
Powered by phpBB® Forum Software