Mork Banner
Home
Small example
Large example
Tools
Links
Misc
Contributions
Download ChangeLog Mailing list Manual Sourceforge Feedback

Compiler tools

Mork exists in a universe of other compiler tools, all of them with different approaches, capabilties and strengths. This page positions Mork in this world of tools. The page is restricted to non-commercial compiler tools, mainly those for Java. For every tools or category of tools, I try to list the main strength's and weaknesses compared to the Morks respective. Send we an email if you miss an argument!


Lex & Yacc like tools

Lex & Yacc are the classic compiler tools.

JLex - A Lexical Analyzer Generator for Java.

JLex is Lex for Java.

JFlex - A Lexical Analyzer Generator for Java.

Improved JLex.

CUP - LALR parser generator for Java.

Yacc for Java.

pros vs. Mork

  • classic approach
  • well-proven
  • well-known (and widely used for teaching)
  • simple concept, simple implementation
  • available for many languages and platforms

cons vs. Mork

  • mapping is difficult
  • two separate tools that have to be adjusted to each other
  • simple syntax specification only (e.g. no "*" for lists)
  • 1 attribute per symbol only, no inherited attributes
  • access to local attributes only
  • embedded code - which becomes difficult if it contains errors

Top-down parser tools

JavaCC - The Java Parser Generator.

Maybe the first Java parser generator.

ANTLR - ANother Tool for Language Recognition.

Java-rewrite of PCCTS.

pros vs. Mork

  • streigt-forward approach for parser generation. Grammar conflict easier to understand than with bottom-up-tools like Mork. Ideal if you want to hack the generated code.

cons vs. Mork

  • mapping is difficult
  • fixed order of attribute computation
  • access to local attributes only
  • spec files are very technical

Attribute Grammar systems

These are monster tools.

Eli - Compiler tool set.

FNC-2 - Compiler tool set.

pros vs. Mork

  • huge feature set
  • powerfull attribution

cons vs. Mork

  • mapping is difficult
  • quite a lot of specification languages to learn

XML Parser

Xerces - Apache XML parser.

This might be the most popular XML parser.

pros vs. Mork

  • mapping into DOM trees
  • mature code, fast

cons vs. Mork

  • mapping to user-defined classes is difficult
  • if you distribute your application: Mork is smaller than Xerces

XML Mapping tools

Castor - An open source data binding framework for Java.

pros vs. Mork

  • maps objects into XML documents, SQL, etc.

cons vs. Mork

  • TODO, I have not used it.
  • mapping is not statically checked for type errors
  • access to remote attributes

SableCC

SableCC - An object-oriented framework that generates compilers (and interpreters) in the Java programming language.

pros vs. Mork

  • more mature than Mork

cons vs. Mork

  • it's difficult to implement (e.g.) an interpreter by visitor classes. Mapping into user-defined classes is more approriate.

Other

Coco - ?.

Coco/R is a compiler generator which takes a compiler description in the form of an LL(1) attributed grammar and generates the scanner and the parser of the described parser.


Last modified: Fri Mar 29 20:48:06 2002.

Copyright © 2002 Michael Hartmeier.

Hosted at SourceForge.net Logo