We have been using Visual Parse++ for a number of years. Recently due
to the lack of support for Visual Parse++, we are considering
replacing it with a new parser.
Can you recommend a Visual Parser which is as good as Visual Parse++?
Please share your experience. We are looking for a visual parser which
can generate C++ files.
Thank you,
J
> Can you recommend a Visual Parser which is as good as Visual Parse++?
> Please share your experience. We are looking for a visual parser which
> can generate C++ files.
Depending on why you liked VP++, I will give you several distinct
recommendations, and my caveats. Note all of these should purely be
considered *strongly* biased opinions. I am the [co-]author of one of
the tools mentioned (and you will find a hopefully relevant if
somewhat self-serving and certainly shameless plug of said tool).
1) If you specifically liked the IDE, your best choice is probably
grammarforge (aka meta-S) by Quinn Tyler Jackson. I believe Quinn
worked with Will Donahue for a while and integrated the VP++ IDE
into grammarforge. Grammarforge also has integrated regular
expression support within the grammars, although for my taste the
regular expression notation isn't as well integrated as some of the
other tools. Two caveats. First, the tool is LL rather than LR
based, so if you use precedence and associativity declarations, you
will have to rework those. Second, Quinn may no longer be
associated with the product (and it may not even be available).
Your second best choice in that case, may be ANTLR by Terence Parr.
It won't be the VP++ IDE, it will be one designed for ANTLR, but I
suspect you will find it has a similar number of bells and
whistles. ANTLR also has integrated regular expression/parsing
support and the notation is generally quite natural to my mind. A
further plus is ANTLR has traditionally had good community support
(although JavaCC has syphoned some of the interest away), which
means even if Terence is not working on it (and I don't know one
way or the other as I haven't chatted with him in a couple of
years), you are unlikely to be stuck. In addition, ANTLR is free
software--so if you need to fix it yourself (or hire someone to fix
it), you will be able to do so. Caveats, ANTLR is again LL not LR.
ANTLR is also primarily targeted to Java, but it does generate C++
(and I believe C#).
2) If you primarily want regular expression integrated into LR
parsing, there are two choices I would recommend. The DMS toolkit
is a high-end product, with Ira Baxter as the CTO of the developing
company. I believe it has integrated regular expressions into its
parsing notation. It uses GLR parsing, so it can parse just about
any formalism. It has attribute grammar support, which is a more
tightly intgrated form of semantic actions. I also presume it has
an IDE, and possibly quite a sophisticated one. Caveats. First,
it is a buy-into system with cradle-to-grave semantics. Second, it
is likely to be relatively pricey.
I would also recommend Yacc++ (my product) in that category. It
has about the same power (LR with integrated regular expressions)
as VP++ and has a library with about the same number of features
and intrusiveness. You will find the "Language Objects Library",
as we call it, a bit more featureful and thus a bit more complex
than the VP++ library. The commercial version (with one year of
support) will cost you $1K. Caveats. First, no IDE--we had one
once, but dropped it as not particularly useful (and it was tied to
the original Sun Windows system, not Microsoft Windows, not X
Windows, not even NeWS). Second, it is truly C++ centric. We have
a C# version in a limited beta, but the code is so non-idiomatic C#
that we are going to have to rewrite it before releasing it to the
general public.
Potential plus that you are unlikely to find elsewhere, We are real
interested in servicing the VP++ market and would like to provide a
version of Yacc++ that can read VP++ grammars and generate code for
our library (possibly extended with some VP++-like APIs). We would
be willing to work with some early customers to develop this and
verify that the product works on their grammars. Later customers
would then get our normal bug-fix support for VP++ compatibility
problems. If the VP++ IDE is important, we would even be willing
to develop a similar IDE to "your" specifications, splitting the
cost amongst the various VP++ customers. If you are interested in
this, let's try to find at least 4 more customers.
Another plus is that Yacc++ will soon have complete Perl compatible
regular expression integrated into its LR engine (and not with some
hack of calling libpcre and hoping it works). We believe we have
the theory worked out and someone beginning to implement the key
missing feature, back-references. (This, of course, is not the
only technical uniqueness to Yacc++. It's also the only predicated
LR parser generator. We believe the AST constuctors are also
uniquely powerful.)
Other generators worth investigating:
Bison and/or yacc. This is "the standard" tool. Recent versions
have supported GLR parsing, but not integrated regular expressions
as far as I know. Versions that generate C++ are definitely
available. Lots of spin-off projects, many of which unfortunately
die-off after the initial author moves on (e.g. graduates).
JavaCC, a spin-off of ANTLR, with a very active community and some
nice add-on tools (JTB and JJTREE). Unfortunately, I think it is
Java only.
ASF+SDF, a GLR tool that has definite popularity in academic
circles. I don't know much beyond that.
LALR by Paul Mann a quite capable and light-weight tool.
ELI a powerful system, probably nearly on par with the DMS toolkit,
composed from parts of a variety of academic researchers with some
clever glue to tie it all together, as a result sometimes a little
disjointed.
Cocktail by Josef Groelsch--a really great tool in its time, but I
don't know if it was ever migrated from Modula-2.
There are, of course, many other options beyond these I have listed
(e.g. Gold by Devin Cook), but I don't know enough about them to make
any comments at all.
One general caveat about the parser generator market. Very few people
actually make money in the parser generator market. As a result, most
parser generators are toys (or initially one use tools*) written by one
person and unfortunately only with support as long as the person stays
interested, but you know that as an ex-Sandstone customer. The tools
I listed have shown some longevity by being around (and supported) for
more than a year or two. In fact, I believe that yacc, LALR, Bison,
Yacc++, and ANTLR all predate VP++ (and I listed them in order of when
I think they first existed), so that those which are still supported
are likely to continue to be supported. Some of them yacc, Bison, and
ANTLR are effectively community supported and thus may continue
indefinitely. (Yacc++ also has recently been released in a free
version which may also acquire a community but hasn't yet.) On the
other hand, LALR and Yacc++ have developers that have both continued
to do so for atleast 20 years--the first pre-version of Yacc++ was
described at a 1987 Sigplan conference.
Well, this is probably more than you wanted in some ways and less in
others.
Still, I hope this helps,
-Chris
*****************************************************************************
Chris Clark Internet : com...@world.std.com
Compiler Resources, Inc. Web Site : http://world.std.com/~compres
23 Bailey Rd voice : (508) 435-5016
Berlin, MA 01503 USA fax : (978) 838-0263 (24 hours)
*) BTW, the first version of Yacc++ was intended as a one use tool and
part of a bigger project. It was only after the scope of that
larger project was realized that it took on a life of its own.
> 1) If you specifically liked the IDE, your best choice is probably
> grammarforge (aka meta-S) by Quinn Tyler Jackson. I believe Quinn
> worked with Will Donahue for a while and integrated the VP++ IDE
> into grammarforge. Grammarforge also has integrated regular
> expression support within the grammars, although for my taste the
> regular expression notation isn't as well integrated as some of the
> other tools. Two caveats. First, the tool is LL rather than LR
> based, so if you use precedence and associativity declarations, you
> will have to rework those. Second, Quinn may no longer be
> associated with the product (and it may not even be available).
The same for TextTransformer, which is fully supported and continuously
extended. Actually TeTra emulates or produces kind of PEG parsers, while
the grammar syntax is different from PEG (with added features).
Semantical actions have a C++ interface, and a subset of C++ is already
built into the emulator. Together with the AST generation and
transformation features, and the built-in file manager, many tasks can
be performed without even leaving the TeTra IDE. For production runs,
outside the IDE, the TeTra engine can be invoked from the command line,
or can be embedded into applications. All that in addition to the
generation of C++ source files of recursive-descent parsers :-)
DoDi
Correct - JavaCC only produces Java lexers/parsers at the moment.
Also, I'd recommend JJTree over JTB since JTB doesn't support all the
current JavaCC lexical constructs. For example, JTB can't handle token
definitions that contain repetition ranges, e.g.:
TOKEN : {
<THREE_HELLOS : ("hello"){3}>
}
Yours,
> ANTLR is also primarily targeted to Java, but it does generate C++
> (and I believe C#).
ANTLR 3.01 currently supports Java, C, C#, Objective-C, C++, Python
and Ruby.
The Java, C# and C code generators are current with all of ANTLR's
features, the rest are lagging a little bit behind. ANTLR 3.1 is due
out "real soon now" - hopefully it will get all the generators back in
sync.
>In fact, I believe that yacc, LALR, Bison, Yacc++, and ANTLR all
>predate VP++ (and I listed them in order of when I think they first
>existed),
ANTLR was preceded by PCCTS (1989, also by Terence Parr) which was
contemporary with early versions of Bison (1.03?). PCCTS is still
available and its LL(k) parsers are quite powerful, but it targets
only C and lacks many of the niceties of ANTLR.
George
--
for email reply remove "/" from address
> Chris F Clark wrote:
>
>> 1) If you specifically liked the IDE, your best choice is probably
>> grammarforge (aka meta-S) by Quinn Tyler Jackson. I believe Quinn
>> worked with Will Donahue for a while and integrated the VP++ IDE
>> into grammarforge. ...
> The same for TextTransformer, which is fully supported and continuously
> extended. ...
> DoDi
Did you mean by your reply that you have the VP++ IDE in TextTransformer?
That was my reason for recommending GrammarForge so highly in that
context. Not to imply that it isn't worth recommending otherwise--it
is a good tool. And, I'm not trying to suggest the TextTransformer is
not also a good tool. I haven't looked closely enough at it yet, and
even if I did my view would only be my own prejudiced opinion. (If
you wouldn't mind sending me a copy of your documentation, I wouldn't
mind looking more closely. It has stood one of my main criteria, it
doesn't look like a tool that will disappear.)
Moreover, if it actually has the VP++ IDE, then it definitely deserves
consideration if the IDE is the original poster's priority (and the
way I read the posting it seemed it might be). Also, even if it has a
different IDE, it might be worth considering.
However, I was trying to point out the tool that I thought best met
the posters criteria, and since they had previously used VP++ (and
mentioned the visual aspect), using a tool that had the same IDE
seemed like the obvious first recommendation. If TextTransformer uses
the VP++ IDE, I apologize as I wasn't aware of that. If it has a
different IDE, it still may be a great choice, but it didn't meet what
I thought the poster's criteria might be.
The second consideration seemed to be a tool which accepted the same
grammars as VP++, thus a tool which integrates regular expressions and
LR parsing, since that's the language family which VP++ supported.
Not that there's anything wrong with other language families, but if
you have a grammar written in one language family, then switching to a
different one is likely to require you to modify your grammar. Note
that I'm not aware of any tool that meets this criteria and also has
an IDE. In fact, the number of tools that I'm certain that meet the
LR-regular parsing criteria is quite limited.
In any case, I didn't mean to slight TextTransformer, but I didn't
have information that caused me to recommend it. If I was
misinformed, I apologize, both to you and the original requestor.
Best regards,
It's LRGen 8.3 now, no longer called LALR, and upgraded to
handle LR(1) grammars.
Paul B Mann
http://lrgen.com