Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Objectteams » OT/J Parser
OT/J Parser [message #567425] Tue, 12 January 2010 14:31
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1843
Registered: July 2009
Senior Member
I've repeatedly been asked about a parser for OT/J that can be
used in third party tools.

For all you potential tool developers, the preferred option should
be to directly use the Eclipse DOM AST, which contains all OT/J
extensions. Instead of directly accessing a parser you might start
at JDT resources like these:
To find out about the AST with OT/J extensions just look at .eclipse.jdt.core/dom/org/eclipse/jdt/core/dom

This option might imply that your tools become Eclipse plugins, too,
which isn't a bad idea, I guess. Should you need to run your tool
standalone you just need a number of Eclipse plugins on you classpath.

If you still want to play with a parser of your own, I might send you
a JavaCC grammar for OT/J. This grammar is somewhat outdated and only
marginally tested - so you're warned.

Finally, the original OT/J grammar used for the OT/J compiler is not
recommended for use outside the compiler, because the grammar is
optimized more for being strictly LALR(1) than for readability.
It is only useful in conjunction with the parser which contains
some more handcoded syntax checks and which is also optimized for
recovery after syntax errors. You wouldn't want to bother with such
details in your tool.

So, with the DOM AST option you're directly working on tested code,
without worrying about the particulars of a highly tuned parser.
How's that?

Previous Topic:How to export metrics from the Metrics plug-in
Next Topic:Constructing instances of value-bound classes
Goto Forum:

Current Time: Sun Jan 16 10:19:34 GMT 2022

Powered by FUDForum. Page generated in 0.01608 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top