[Mono-list] VB Language (was: I want to get in on this.)

Jay Freeman (saurik) saurik@saurik.com
Thu, 12 Jul 2001 20:26:22 -0500


I recommend all of the people who are interested in the yacc/BASIC thread
read this post:

http://groups.google.com/groups?q=visual+basic+yacc+next&hl=en&imgsafe=off&s
afe=off&rnum=1&ic=1&selm=96-07-122%40comp.compilers

It was written to comp.compilers back in 1996 about the construction of a
visual basic grammar.  The trick mentioned of munging the tokens before they
hit the grammar parser is actually a rather commonly mentioned one.  To get
an idea of how lucrative a yacc grammar for VB is, you really have to read
the numerous requests for one in comp.compilers,
comp.lang.basic.visual.misc, and comp.lang.basic.visual.3rdparty over the
last 5 years and the replies explaning that there isn't one available and
simple explanations as to why.

The people who have parsers for it all claimed they were hard to build, that
they did the munging trick or went with something other than yacc, and that
they were now proprietary and weren't going to be released as too much
effort was put into them.

Something to point out is that I, myself, never really learned much about
grammars, and most of what I know are from crash courses of trying to write
a VB6 parser a few months ago that involved reading the beginning of a book
on ANTLR that explained what the limitations of LALR parsers (such as yacc
are) and why a predicated-LL(k) can parse more languages.  I might be very
wrong on some of my direct appraisals (such as Miguel's example, which I
feel would not work as it doesn't seem left recursive), and I hope no one
holds it that against me.

Sincerely,
Jay Freeman (saurik)
saurik@saurik.com