Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

712 views
Skip to first unread message

Paul B Mann

unread,
Feb 7, 2012, 5:47:17 PM2/7/12
to
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

Steven G. Kargl

unread,
Feb 8, 2012, 2:08:18 PM2/8/12
to
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

Hans Aberg

unread,
Feb 9, 2012, 4:28:30 AM2/9/12
to
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

Paul B Mann

unread,
Feb 10, 2012, 1:19:37 PM2/10/12
to
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]

Paul B Mann

unread,
Feb 10, 2012, 4:24:41 PM2/10/12
to
> 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

Steven G. Kargl

unread,
Feb 11, 2012, 1:31:29 PM2/11/12
to
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

glen herrmannsfeldt

unread,
Feb 12, 2012, 1:29:16 AM2/12/12
to
Steven G. Kargl <s...@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

Paul B Mann

unread,
Feb 14, 2012, 11:14:13 AM2/14/12
to
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

Boriel

unread,
Oct 24, 2012, 4:44:18 AM10/24/12
to
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?

Jim Patchell

unread,
Nov 5, 2012, 11:36:30 PM11/5/12
to
> 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

Charles E. Bortle, Jr.

unread,
Nov 12, 2012, 4:24:58 PM11/12/12
to
"Jim Patchell" <patc...@cox.net> wrote in message
Hello,

I did a little Googleing and found the registration info for the web
site. There was an email address listed p...@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

Charles E. Bortle, Jr.

unread,
Nov 12, 2012, 5:45:15 PM11/12/12
to
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

Armel Asselin

unread,
Nov 13, 2012, 3:22:20 AM11/13/12
to
>"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

char...@calvaryanaheim.org

unread,
Feb 26, 2013, 1:14:43 PM2/26/13
to
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
char...@calvaryanaheim.org

Roberto Waltman

unread,
Feb 27, 2013, 9:35:15 PM2/27/13
to
charlesb wrote:
>I found it yesterday at http://download.cnet.com/windows

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

Thomas David Rivers

unread,
Feb 28, 2013, 7:46:29 AM2/28/13
to
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 -

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

OJFord

unread,
Jun 10, 2015, 6:58:28 AM6/10/15
to
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. ...

Davide Grandi

unread,
Jun 11, 2015, 5:58:44 PM6/11/15
to
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...@mclink.it
mobile : +39 339 7468 778
[It's a Windows executable with examples but not the source code. -John]
0 new messages