Impact + grammatica = true?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Impact + grammatica = true?

Jonas Forssell
Hello,

I'm part of a team of developers for Impact (http://impact.sf.net).

First of all, let me congratulate you on the simplicity of grammatica. I had a look at JavaCC but was soon lost in the examples - mixing grammar and code. grammatica seems much cleaner.

We need to extend Impact with more interfaces. First step will be a parser for IGES graphical format (http://www.nist.gov/iges/)

This format consists of four main blocks (Start, Global, Directory, and Property) where some have fixed formats and some use separators.

I'm concidering using grammatica as the basis for all future Impact parsers. Will it be able to cope with advanced file structures such as IGES?

Thanks
/Jonas Forssell, Gothenburg, Sweden

_______________________________________________
Grammatica-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/grammatica-users
Reply | Threaded
Open this post in threaded view
|

Re: Impact + grammatica = true?

Per Cederberg
Hi,

Thanks for the kind words about Grammatica! The "messy" grammar
formats in JavaCC and ANTLR was actually one of the main points
for writing yet another parser generator. :)

Looking around on the IGES site, I didn't find any easily
digestible specification. So it's rather hard to say how good a
fit Grammatica might be just looking at a few examples. Also,
if there is a BNF specification for IGES, it will make writing
Grammatica grammars easier.

Grammatica generates the same type of parsers as JavaCC and
ANTLR (i.e. LL(k) parsers), so the capabilities are similar.
Question is rather if a tool like this is suitable for the
type of grammar you are looking at. Certainly, it is always
possible to create a grammar that accepts any valid IGES file,
but the problem is to break down the structure in such a way
as to make the output actually useful.

If you want to play with Grammatica, I suggest using the
latest development version and the "--parse" and "--tokenize"
modes. That way to can experiment with Grammatica without
writing more than a .grammar file.

Cheers,

/Per

PS. Sorry if you are having problems accessing the web site
currently. My DNS provider has been under a DDOS attack all
day, so IP lookups work poorly at the moment. :-(

Jonas Forssell wrote:

> Hello,
>
> I'm part of a team of developers for Impact (http://impact.sf.net).
>
> First of all, let me congratulate you on the simplicity of grammatica. I
> had a look at JavaCC but was soon lost in the examples - mixing grammar
> and code. grammatica seems much cleaner.
>
> We need to extend Impact with more interfaces. First step will be a
> parser for IGES graphical format (http://www.nist.gov/iges/)
>
> This format consists of four main blocks (Start, Global, Directory, and
> Property) where some have fixed formats and some use separators.
>
> I'm concidering using grammatica as the basis for all future Impact
> parsers. Will it be able to cope with advanced file structures such as
> IGES?
>
> Thanks
> /Jonas Forssell, Gothenburg, Sweden
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Grammatica-users mailing list
> [hidden email]
> http://lists.nongnu.org/mailman/listinfo/grammatica-users


_______________________________________________
Grammatica-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/grammatica-users
Reply | Threaded
Open this post in threaded view
|

Re: Impact + grammatica = true?

Iain McGinniss
In reply to this post by Jonas Forssell
If you're looking about for Java parser generators, you may also want to
take a look at SableCC:

http://sablecc.org/

It generates very strongly typed parse trees, which can be useful in
certain situations (and a nuisance in others). Having said that however,
Grammatica was a good match for my project so it's worth considering both.

Cheers,
Iain McGinniss

Jonas Forssell wrote:

> Hello,
>
> I'm part of a team of developers for Impact (http://impact.sf.net).
>
> First of all, let me congratulate you on the simplicity of grammatica.
> I had a look at JavaCC but was soon lost in the examples - mixing
> grammar and code. grammatica seems much cleaner.
>
> We need to extend Impact with more interfaces. First step will be a
> parser for IGES graphical format (http://www.nist.gov/iges/)
>
> This format consists of four main blocks (Start, Global, Directory,
> and Property) where some have fixed formats and some use separators.
>
> I'm concidering using grammatica as the basis for all future Impact
> parsers. Will it be able to cope with advanced file structures such as
> IGES?
>
> Thanks
> /Jonas Forssell, Gothenburg, Sweden
________________________________________________________________________________
This email (and any attachments) is private and confidential, and is intended solely for the
addressee. If you have received this communication in error please remove it and inform us via
telephone or email. Although we take all possible steps to ensure mail and attachments
are free from malicious content, malware and viruses, we cannot accept any responsibility
whatsoever for any changes to content outwith our administrative bounds. The views represented
within this mail are solely the view of the author and do not reflect the views of the organisation
as a whole.
________________________________________________________________________________
Graham Technology plc                                                http://www.grahamtechnology.com
________________________________________________________________________________

_______________________________________________
Grammatica-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/grammatica-users

Iain.McGinniss.vcf (349 bytes) Download Attachment