Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I don't know if the COTS Java compiler will cooperate with you attempting to extend its syntax. And I don't think it will regenerate source code, but then you may not care if you only want to compile programs after expanding your macros.</p> <p>If you want to extend the grammar, you probably as a minimum to to get a parser generator, the grammer for Java, and start hacking away. <a href="http://www.antlr.org" rel="nofollow">ANTLR</a> would do, and I believe it has a Java grammar available. You'll need to build a prettyprinter to regenerate macro-resolved code to feed to a compiler; I don't think ANTLR offers this off the shelf.</p> <p>As a practical matter, I suspect you will want symbol table information that the hygenic macros can inspect and adjust as they expand. In that case, you might get an open source Java compiler (<a href="http://jikes.sourceforge.net" rel="nofollow">Jikes</a>) and hack that up. It may be the case that such open source compilers are not up to the latest Java standards.</p> <p>If want something reasonably up to date, that parses Java, will let you hack at the grammar, and has full symbol table support, you might consider our <a href="http://www.semanticdesigns.com/Products/DMS/DMSToolkit.html" rel="nofollow">DMS Software Reengineering Toolkit</a> and its <a href="http://www.semanticdesigns.com/Products/FrontEnds/JavaFrontEnd.html" rel="nofollow">Java Front End</a>. DMS provides parsing, tree building, symbol table construction, procedural access/modification to the AST, prettyprinting to regenerate source, and source-to-source transformations for what grammar you define to DMS (including your hygenic macros, if you add their syntax to the Java grammar).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload