Re: Parsing a simple BASIC language

marcov@toad.stack.nl (Marco van de Voort)
18 Apr 2001 02:24:43 -0400

          From comp.compilers

Related articles
Parsing a simple BASIC language paul.dunn4@ntlworld.com (paul.dunn4) (2001-04-04)
Re: Parsing a simple BASIC language barry_j_kelly@hotmail.com (Barry Kelly) (2001-04-10)
Re: Parsing a simple BASIC language stephan@pcrm.win.tue.nl (2001-04-10)
Re: Parsing a simple BASIC language christl@fmi.uni-passau.de (2001-04-12)
Re: Parsing a simple BASIC language paul.dunn4@ntlworld.com (Dunny) (2001-04-12)
Re: Parsing a simple BASIC language barry_j_kelly@hotmail.com (Barry Kelly) (2001-04-14)
Re: Parsing a simple BASIC language marcov@toad.stack.nl (2001-04-18)
Re: Parsing a simple BASIC language michael@moria.de (2001-04-18)
Re: Parsing a simple BASIC language paul.dunn4@ntlworld.com (Dunny) (2001-04-22)
Re: Parsing a simple BASIC language barry_j_kelly@hotmail.com (Barry Kelly) (2001-04-22)
| List of all articles for this month |
From: marcov@toad.stack.nl (Marco van de Voort)
Newsgroups: comp.compilers
Date: 18 Apr 2001 02:24:43 -0400
Organization: Eindhoven University of Technology, The Netherlands
References: 01-04-014 01-04-039 01-04-074 01-04-097
Keywords: parse, Basic
Posted-Date: 18 Apr 2001 02:24:43 EDT

  Barry Kelly wrote:
> Unfortunately, speed is a big concern of mine; I'm writing a
> dynamically compiling expression evaluator, that essentially produces
> a function pointer from a string containing an expression, designed to
> be applicable to graphics (matrix maths) and spreadsheet
> applications. While multiple iterations will amortize the cost of
> upfront expression generation, to compete with simpler interpreted
> systems (like parser10, you'll find it on most Delphi archives) I'm
> trying to get it as fast as possible.


If you like Parser10, have a look at


http://www.stack.nl/~marcov/symbolic.zip


It is in FPC, but I fixed it for Delphi in 2 minutes, but forgot to IFDEF it
in the code :-)


( if "type xx=^simpletype; var yy:xx;" then FPC in native Object Pascal
mode wants yy[5], while Delphi wants yy^[5])


The speed is comparable with parser10.


P.s. is Object Pascal LL(1)?


Post a followup to this message

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