help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BISON To Represent BASIC Grammer


From: Valter G. Nogueira Jr.
Subject: Re: BISON To Represent BASIC Grammer
Date: Tue, 27 Apr 2004 14:46:12 -0300

Wayne,

I really know how is to be trapped in VB 6.0. All my applications are
VB6/ASP.

Currently I am looking a way to port them to Java/JSP.

I wrote a small version that can compile vb classes with several
limitations, specially regarding to arrays.

Anothers are some shift/reduce and reduce/reduce that I can't address yet
and some kind of expressions/constants I didn't implemented.

My worse enemy is spare time. During last 8 months I have spent less than
100 hours, much of that reading docs, gcc-java parser, and c-tool sources
and rewriting the grammar.

Valter

----- Original Message ----- 
From: "Wayne Green" <address@hidden>
To: "Valter G. Nogueira Jr." <address@hidden>
Sent: Friday, April 23, 2004 12:13 PM
Subject: Re: BISON To Represent BASIC Grammer


> You know, I'd be interested in that as well. Especially VB from
> Microsoft. There are a tremendous number of people trapped in
> MS land under Excel and Access that rely heavily on VB.
> Opensource migration for their macros would be saintly!
> --Wayne
>
>
> On Fri, 2004-04-23 at 07:11, Valter G. Nogueira Jr. wrote:
> > Chris
> >
> > I didn't answer you because I was away.
> >
> > I am trying - not sucessfully - to develop a Basic grammar for a while.
> >
> > Could you tell me where you found the "great post in a newsgroup where
> > someone has put their yacc/flex implementation of a subset of BASIC in
their
> > post".
> >
> > Thanks,
> >
> > Valter
> >
> > ----- Original Message ----- 
> > From: "Chris Cranford" <address@hidden>
> > To: "Hans Aberg" <address@hidden>
> > Sent: Tuesday, April 13, 2004 10:12 PM
> > Subject: Re: BISON To Represent BASIC Grammer
> >
> >
> > > Hans -
> > >
> > > I looked around a little more detailed since I knew what to be looking
for
> > > and found a great post in a newsgroup where someone has put their
> > yacc/flex
> > > implementation of a subset of BASIC in their post.
> > >
> > > I followed this as an example and thus far it seems to be working.  So
> > with
> > > that said, let me make sure I have an understanding of what I should
do.
> > >
> > > 1. Develop a way to pass the BASIC file's source to the yyparse()
> > >    function and detect if the parse is successful or not.
> > >
> > > 2. Once the syntax pass #1 is successful, then I need to develop a
> > >    way to 'interpret' the code and generate a bytecode instruction
> > >    list of the code and this bytecode should then be stored in a
> > >    file.
> > >
> > > The the bytecode file will get used by the Virtual Machine in order to
> > > emulate/run the code ...
> > >
> > > Right?
> > >
> > > Thanks
> > > Chris
> > >
> > > ----- Original Message ----- 
> > > From: "Hans Aberg" <address@hidden>
> > > To: "Chris Cranford" <address@hidden>
> > > Cc: <address@hidden>
> > > Sent: Tuesday, April 13, 2004 7:07 PM
> > > Subject: Re: BISON To Represent BASIC Grammer
> > >
> > >
> > > > At 18:34 -0400 2004/04/13, Chris Cranford wrote:
> > > > >I am trying to write a BASIC-language script bytecode compiler.
> > Someone
> > > > >recommended that I use BISON in order to properly parse my .BAS and
to
> > > > >generate my bytecode file.  Has anyone attempted this in the past
or
> > can
> > > > >offer some assistance?
> > > >
> > > > If you do not get any suggestions in this list, I suggest you try
the
> > > > newsgroup comp.compilers and its FAQ published there monthly. Also,
> > Bison
> > > > just applies the LALR(1) parsing algorithm, so you might check if
there
> > is
> > > > already a open source BASIC compiler around with a .y grammar file.
If
> > all
> > > > that fails, the best way is to get hold of a BASIC grammar from some
> > > > standard, and then attempt to adapt it for use with an LALR(1)
parser
> > > > generator. And you probably need Flex as well to generate the lexer,
see
> > > > GNU links, and:
> > > >   Help-flex mailing list
> > > >   address@hidden
> > > >   http://mail.gnu.org/mailman/listinfo/help-flex
> > > >
> > > >   Hans Aberg
> > > >
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > address@hidden http://mail.gnu.org/mailman/listinfo/help-bison
> > > >
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > address@hidden http://mail.gnu.org/mailman/listinfo/help-bison
> >
> >
> >
> > _______________________________________________
> > address@hidden http://mail.gnu.org/mailman/listinfo/help-bison
> -- 
> Wayne Green                     address@hidden
> 1343 Carnation Circle
> Longmont, CO 80503              +1.303.818.1290
>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]