Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #444 > unrolled thread

LRSTAR 3.0: LALR(k) parser generator & lexer generator for C++

Started byPaul B Mann <paul@paulbmann.com>
First post2012-02-07 14:47 -0800
Last post2012-11-13 09:22 +0100
Articles 18 — 13 participants

Back to article view | Back to comp.compilers


Contents

  LRSTAR 3.0: LALR(k) parser generator & lexer generator for C++ Paul B Mann <paul@paulbmann.com> - 2012-02-07 14:47 -0800
    Re: LRSTAR 3.0: LALR(k) parser generator & lexer generator for C++ "Steven G. Kargl" <sgk@REMOVEtroutmask.apl.washington.edu> - 2012-02-08 19:08 +0000
      Re: LRSTAR 3.0: LALR(k) parser generator & lexer generator for C++ Hans Aberg <haberg-news@telia.com> - 2012-02-09 10:28 +0100
      Re: LRSTAR 3.0: LALR(k) parser generator & lexer generator for C++ Paul B Mann <paul@paulbmann.com> - 2012-02-10 10:19 -0800
      Re: LRSTAR 3.0: LALR(k) parser generator & lexer generator for C++ Paul B Mann <paul@paulbmann.com> - 2012-02-10 13:24 -0800
        Re: LRSTAR 3.0: LALR(k) parser generator & lexer generator for C++ "Steven G. Kargl" <sgk@REMOVEtroutmask.apl.washington.edu> - 2012-02-11 18:31 +0000
          Re: LRSTAR 3.0: LALR(k) parser generator & lexer generator for C++ glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-02-12 06:29 +0000
            Re: LRSTAR 3.0: LALR(k) parser generator & lexer generator for C++ Paul B Mann <paul@paulbmann.com> - 2012-02-14 08:14 -0800
              Re: LRSTAR 3.0: LALR(k) parser generator & lexer generator for C++ Boriel <boriel@gmail.com> - 2012-10-24 01:44 -0700
                Re: LRSTAR 3.0: LALR(k) parser generator & lexer generator for C++ charlesb@calvaryanaheim.org - 2013-02-26 10:14 -0800
                  Re: LRSTAR 3.0: LALR(k) parser generator & lexer generator for C++ Roberto Waltman <lists@rwaltman.com> - 2013-02-27 21:35 -0500
                    Re: LRSTAR 3.0: LALR(k) parser generator & lexer generator for C++ Thomas David Rivers <rivers@dignus.com> - 2013-02-28 07:46 -0500
                      Re: LRSTAR 3.0: LALR(k) parser generator & lexer generator for C++ OJFord <ford.ollie@gmail.com> - 2015-06-09 07:51 -0700
                        Re: LRSTAR 3.0: LALR(k) parser generator & lexer generator for C++ Davide Grandi <davide.grandi@mclink.it> - 2015-06-11 21:37 +0200
    Re: LRSTAR 3.0: LALR(k) parser generator & lexer generator for C++ Jim Patchell <patchell@cox.net> - 2012-11-05 20:36 -0800
      Re: LRSTAR 3.0: LALR(k) parser generator & lexer generator for C++ "Charles E. Bortle, Jr." <charlesb.cca@mpowercom.net> - 2012-11-12 13:24 -0800
        Re: LRSTAR 3.0: LALR(k) parser generator & lexer generator for C++ "Charles E. Bortle, Jr." <charlesb.cca@mpowercom.net> - 2012-11-12 14:45 -0800
      Re: LRSTAR 3.0: LALR(k) parser generator & lexer generator for C++ "Armel Asselin" <armelasselin@hotmail.com> - 2012-11-13 09:22 +0100

#444 — LRSTAR 3.0: LALR(k) parser generator & lexer generator for C++

FromPaul B Mann <paul@paulbmann.com>
Date2012-02-07 14:47 -0800
SubjectLRSTAR 3.0: LALR(k) parser generator & lexer generator for C++
Message-ID<12-02-004@comp.compilers>
LRSTAR is a fast LALR(k) parser generator for C/C++ programmers, that
builds very fast compilers and language processors by using
compressed-matrix parser tables.  Creates compiler front-ends that
read source code at 1,000,000 lines per second.

LRSTAR reads the powerful TBNF grammar notation which facilitates
building an AST automatically and other advanced functionality.
Solves the "typedef" problem in C grammars.

The compiler front-end source code is in C++, however, a user may re-
write the skeleton file in another language, such as C, C#, Java, and
then generate code in that language.  Contains Microsoft Visual Studio
C/C++ work spaces.

DFASTAR and DFAC lexer generators are included in the downloads.
These generate very fast DFA lexical analyzers which read 30,000,000
tokens per second -- twice the speed of Flex.

LRSTAR is "open source" now, BSD license.  A windows version is
available at:

http://compilerware.com (the website) and
https://sourceforge.net/projects/lrstar/

No one has ported it to Unix or Linux yet.  It may be 99% portable.
It was written with Microsoft Visual
Studio 2008 C++, however, I try to make my code portable.

To accomplish LALR(k) it uses nondeterminism only for those states
that are not LALR(1), so it's mostly LALR(1) and the parsers are small
and fast.

Comments are welcome and appreciated.

Paul B Mann

[toc] | [next] | [standalone]


#446

From"Steven G. Kargl" <sgk@REMOVEtroutmask.apl.washington.edu>
Date2012-02-08 19:08 +0000
Message-ID<12-02-006@comp.compilers>
In reply to#444
On Tue, 07 Feb 2012 14:47:17 -0800, Paul B Mann wrote:
> No one has ported it to Unix or Linux yet.  It may be 99% portable.
> It was written with Microsoft Visual
> Studio 2008 C++, however, I try to make my code portable.

UNIX and unix-like system are case sensitive.  There is no chance that
this code will build without a significant porting effort.  For
example, you have Global.H in some directory; yet, your source has
'#include "global.h"'.

It may also be advantageous to include simple instructions of which
files need to be compiled and the order.

--
steve

[toc] | [prev] | [next] | [standalone]


#447

FromHans Aberg <haberg-news@telia.com>
Date2012-02-09 10:28 +0100
Message-ID<12-02-007@comp.compilers>
In reply to#446
On 2012/02/08 20:08, Steven G. Kargl wrote:
> On Tue, 07 Feb 2012 14:47:17 -0800, Paul B Mann wrote:
>> No one has ported it to Unix or Linux yet.  It may be 99% portable.
>> It was written with Microsoft Visual
>> Studio 2008 C++, however, I try to make my code portable.
>
> UNIX and unix-like system are case sensitive.

Except OS X, which is certified UNIX in versions 10.6 and later. (Though
one can choose a case sensitive file system, some software, notably from
Adobe, will not run properly.)

> There is no chance that
> this code will build without a significant porting effort.  For
> example, you have Global.H in some directory; yet, your source has
> '#include "global.h"'.

As long the file is not called differently, this is not so a big problem
- just change the file name.

Hans

[toc] | [prev] | [next] | [standalone]


#448

FromPaul B Mann <paul@paulbmann.com>
Date2012-02-10 10:19 -0800
Message-ID<12-02-008@comp.compilers>
In reply to#446
On Feb 8, 1:08 pm, "Steven G. Kargl"
<s...@REMOVEtroutmask.apl.washington.edu> wrote:
>
> UNIX and unix-like system are case sensitive.  There is no chance that
> this code will build without a significant porting effort.  For
> example, you have Global.H in some directory; yet, your source has
> '#include "global.h"'.
>
> It may also be advantageous to include simple instructions of which
> files need to be compiled and the order.

I can rename those header files and do a global change on the
include filenames in Visual Studio in about 15 minutes.

Is it really that difficult to do this with UNIX ?

I will make sure the next release has these changes.
Thanks for the valuable feedback.  I really appreciate it.

Paul B Mann
[It's easy enough if you know what the files are and where all the
include statements are. -John]

[toc] | [prev] | [next] | [standalone]


#449

FromPaul B Mann <paul@paulbmann.com>
Date2012-02-10 13:24 -0800
Message-ID<12-02-009@comp.compilers>
In reply to#446
> UNIX and unix-like system are case sensitive.  There is no chance that
> this code will build without a significant porting effort.  For
> example, you have Global.H in some directory; yet, your source has
> '#include "global.h"'.
>
> It may also be advantageous to include simple instructions of which
> files need to be compiled and the order.

I have created a newer release: 3.0.211 in which I renamed the file
names to all lower case and changed the #include filenames to match.

I also added "readme.txt" files to the "source" directories which
tells you how to compile under UNIX/Linux (i.e. compile the
"lrstar.cpp" file, the "dfastar.cpp" file and the "dfac.cpp" file).

I'm sure there will be more changes needed, because I'm not so
familiar with UNIX.

Paul Mann

[toc] | [prev] | [next] | [standalone]


#453

From"Steven G. Kargl" <sgk@REMOVEtroutmask.apl.washington.edu>
Date2012-02-11 18:31 +0000
Message-ID<12-02-013@comp.compilers>
In reply to#449
On Fri, 10 Feb 2012 13:24:41 -0800, Paul B Mann wrote:

>> UNIX and unix-like system are case sensitive.  There is no chance that
>> this code will build without a significant porting effort.  For
>> example, you have Global.H in some directory; yet, your source has
>> '#include "global.h"'.
>>
>> It may also be advantageous to include simple instructions of which
>> files need to be compiled and the order.
>
> I have created a newer release: 3.0.211 in which I renamed the file
> names to all lower case and changed the #include filenames to match.
>
> I also added "readme.txt" files to the "source" directories which
> tells you how to compile under UNIX/Linux (i.e. compile the
> "lrstar.cpp" file, the "dfastar.cpp" file and the "dfac.cpp" file).
>
> I'm sure there will be more changes needed, because I'm not so
> familiar with UNIX.

Thanks.

Yes, more changes are needed.  First, one needs to comment out
'#define DOS' in globals.h.  Then, (on at least FreeBSD) one needs to
remove '#include "malloc.h", because everything that at one time was
declared in that file is now found in stdlib.h and inclusion of
malloc.h leads to an error.  Now, I hit the show stopper:

laptop:kargl[240] g++ -o z -I. dfac.cpp |& more
In file included from actions.cpp:4,
                 from dfac.cpp:2:
global.h:52:15: error: "or" cannot be used as a macro name as
it is an operator in C++

--
steve

[toc] | [prev] | [next] | [standalone]


#454

Fromglen herrmannsfeldt <gah@ugcs.caltech.edu>
Date2012-02-12 06:29 +0000
Message-ID<12-02-014@comp.compilers>
In reply to#453
Steven G. Kargl <sgk@removetroutmask.apl.washington.edu> wrote:

> In file included from actions.cpp:4,
>                 from dfac.cpp:2:
> global.h:52:15: error: "or" cannot be used as a macro name as
> it is an operator in C++

In C, the preprocessor is logically before the compiler, so, as far as
I understand, there is no problem using any C reserved word as a macro
name, as long as you don't need the word.

I know C++ isn't C, but this one surprises me.

Still, if you aren't using the "or" operator, a quick pass through sed
should be able to fix it.

-- glen

[toc] | [prev] | [next] | [standalone]


#461

FromPaul B Mann <paul@paulbmann.com>
Date2012-02-14 08:14 -0800
Message-ID<12-02-021@comp.compilers>
In reply to#454
A current user of LRSTAR 3.0 just sent me a Linux source version that
is working with GCC and LLVM.  I will do some testing of it this week
and upload it to

http://compilerware.com and
http://sourceforge.net/projects/lrstar/

this week, I hope.

Paul Mann

[toc] | [prev] | [next] | [standalone]


#770

FromBoriel <boriel@gmail.com>
Date2012-10-24 01:44 -0700
Message-ID<12-10-012@comp.compilers>
In reply to#461
Hi,

I'm very interested in this projyect and would like to download it,
but all links (compilerware & sourceforge) seems broken ??

Where can I download it?

> A current user of LRSTAR 3.0 just sent me a Linux source version that
> is working with GCC and LLVM.  I will do some testing of it this week
> and upload it to
>
> http://compilerware.com and
>
> http://sourceforge.net/projects/lrstar/
>
> this week, I hope.
>
> Paul Mann

[toc] | [prev] | [next] | [standalone]


#856

Fromcharlesb@calvaryanaheim.org
Date2013-02-26 10:14 -0800
Message-ID<13-02-008@comp.compilers>
In reply to#770
On Wednesday, October 24, 2012 1:44:18 AM UTC-7, Boriel wrote:
> Hi, I'm very interested in this projyect and would like to download
> it, but all links (compilerware & sourceforge) seems broken ?? Where
> can I download it?

To Boriel:

I found it yesterday at
http://download.cnet.com/windows

You will have select the compilers catagory.

Also, when you download it from there, the package that is downloaded
is just a "stub"....when you double-click on it to install it, that
actually causes a downloader from the site to be started and the
"real" package to be downloaded.

From what I can see you don't actually do a windows install of that
package, but I don't have time now to mess with it further, but there
is a readme file in the docs that appeartently tells how to set it all
up.

BTW I have had no further word on the wheereabouts of Paul Mann, and I
have been watching this thread in case anyone else has found any info
about him.

Charles Bortle
charlesb@calvaryanaheim.org

[toc] | [prev] | [next] | [standalone]


#857

FromRoberto Waltman <lists@rwaltman.com>
Date2013-02-27 21:35 -0500
Message-ID<13-02-009@comp.compilers>
In reply to#856
 charlesb wrote:
>I found it yesterday at http://download.cnet.com/windows

Also here:
http://sourceforge.net/projects/lrstar/
--
Roberto Waltman

[toc] | [prev] | [next] | [standalone]


#859

FromThomas David Rivers <rivers@dignus.com>
Date2013-02-28 07:46 -0500
Message-ID<13-02-011@comp.compilers>
In reply to#857
Roberto Waltman wrote:

> charlesb wrote:
>
>
>>I found it yesterday at http://download.cnet.com/windows
>>
>
>Also here:
>http://sourceforge.net/projects/lrstar/

I went to the sourceforge site - the download now appears to be
disabled - when you click on it, it says it can't find any mirrors.

If you go to the "source" section, it says there are zero files in the
SVC repository.

And, when I tried the one at download.cnet.com (downloading the .exe
file and running that) - it says "Download cannot be initiated, go to
download.com and try again."

     - Dave Rivers -

--
rivers@dignus.com                        Work: (919) 676-0847
Get your mainframe programming tools at http://www.dignus.com

[toc] | [prev] | [next] | [standalone]


#1558

FromOJFord <ford.ollie@gmail.com>
Date2015-06-09 07:51 -0700
Message-ID<15-06-002@comp.compilers>
In reply to#859
On Stack Overflow a commenter writes (beneath an answer from Paul):

"It is my humble opinion that LRSTAR is/was extremely good. Paul Mann spent
years getting this right; he then offered it open source following the
industry mantra of "give it away and make money on services". Turns out he
effectively starved; a recent conversation with him indicated he had turned
his attention to another field that provide him with an actual reward. His
last apparent technical act was to remove all the public instances of LRSTAR.
May we all live with YACC forever."

http://stackoverflow.com/questions/3661249/packrat-parsing-vs-lalr-parsing/11479111#comment45390674_11479111

On Thursday, 28 February 2013 12:46:29 UTC, Thomas David Rivers  wrote:
> Roberto Waltman wrote:
>
> > charlesb wrote:
> >
> >
> >>I found it yesterday at http://download.cnet.com/windows
> >>
> >
> >Also here:
> >http://sourceforge.net/projects/lrstar/
>
> I went to the sourceforge site - the download now appears to be
> disabled - when you click on it, it says it can't find any mirrors.
>
> If you go to the "source" section, it says there are zero files in the
> SVC repository. ...

[toc] | [prev] | [next] | [standalone]


#1559

FromDavide Grandi <davide.grandi@mclink.it>
Date2015-06-11 21:37 +0200
Message-ID<15-06-003@comp.compilers>
In reply to#1558
Just downloaded from

http://download.cnet.com/LRSTAR-Parser-Lexer-Generator/3000-2069_4-94121.html

just a zip file

Best regards,

      Davide Grandi
--
Ing. Davide Grandi
email  : davide.grandi@mclink.it
mobile : +39 339 7468 778
[It's a Windows executable with examples but not the source code. -John]

[toc] | [prev] | [next] | [standalone]


#774

FromJim Patchell <patchell@cox.net>
Date2012-11-05 20:36 -0800
Message-ID<12-11-003@comp.compilers>
In reply to#444
> http://compilerware.com (the website) and

His website just went off the air today. :-(  It used to be just empty, now you get the home page for the web hosting service.

I am a bit worried.  Anybody know if Paul Mann is OK?

-Jim

[toc] | [prev] | [next] | [standalone]


#776

From"Charles E. Bortle, Jr." <charlesb.cca@mpowercom.net>
Date2012-11-12 13:24 -0800
Message-ID<12-11-005@comp.compilers>
In reply to#774
"Jim Patchell" <patchell@cox.net> wrote in message
>> http://compilerware.com (the website) and
>
> His website just went off the air today. :-(  It used to be just empty,
> now you get the home page for the web hosting service.
>
> I am a bit worried.  Anybody know if Paul Mann is OK?
>
> -Jim

Hello,

I did a little Googleing and found the registration info for the web
site.  There was an email address listed pbm@paulbmann.com

I sent an email to Paul at that email address, but my email bounced
back almost right a way....

I Googled "Paul Mann" and found a bunch of different Paul Mann's of
various levels of fame and fortune, but found no ref to "our" Paul
Mann.

Years ago, he had an office on El Camino Rd in Tustin, California, USA
only about 15 miles from where I then lived, and I had gotten a flyer
for one of his LALR systems, but, as I say, that was many years ago.

Charles Bortle

[toc] | [prev] | [next] | [standalone]


#778

From"Charles E. Bortle, Jr." <charlesb.cca@mpowercom.net>
Date2012-11-12 14:45 -0800
Message-ID<12-11-007@comp.compilers>
In reply to#776
Hello Again,

As an addendum/correction to my previous post....

Here is the info that was displayed for the domain registration:

 0 0 0  0compilerware.com domain name record
Registrant:

Software Interaction
Paul Mann
306 Mission St
St Marys, KS 66536 US
+1.7853216000
Fax +1.


I called the phone number listed (from my cell phone,
I am in my office at work and did not want to put a long distance
call on the work phone).

The message I got said the call could not be comleated
as dialed....so, it would seem the phone number is gone
too :-O

I had refered to a previous office of Paul Mann, but my brain dropped
a few bits as I typed it...  I should have said El Camino Real Rd.
Some time ago I had an email exchange with Paul and verified that he
was in-fact the same Paul Mann that had been at that El Camino Real
address, but the flyer I had gotten was from back in the 80's.

Charles Bortle

[toc] | [prev] | [next] | [standalone]


#779

From"Armel Asselin" <armelasselin@hotmail.com>
Date2012-11-13 09:22 +0100
Message-ID<12-11-008@comp.compilers>
In reply to#774
>"Jim Patchell"  a icrit
>> http://compilerware.com (the website) and
>I am a bit worried.  Anybody know if Paul Mann is OK?
no, I had some contact some times ago but no news.

Paul has a LinkedIn profile: http://www.linkedin.com/in/paulbmann
(there are other Paul B Mann, but this Paul has so much LR stuff in his
profile that I doubt there can be an error)

Armel

[toc] | [prev] | [standalone]


Back to top | Article view | comp.compilers


csiph-web