Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can build your own parser, your own tree builder, your own tree walker, your own analyzers, your own prettyprinters... but its a lot of work.</p> <p>You might consider tools that provide all this machinery for you. </p> <p>One such tool is our <a href="http://www.semanticdesigns.com/Products/DMS/DMSToolkit.html" rel="nofollow noreferrer">DMS Software Reengineering Toolkit</a>. </p> <p>Given a grammar, DMS will parse and automatically build a tree; yes, it automatically captures "microtokens" such as comments and attaches them to appropriate tree nodes. It can prettyprint the tree back out, before or after transformations. You have to provide support for symbol tables since that's a semantic, not a syntactic construct, but DMS provides generic symbol tables and scope management tools as a library to build upon. DMS also provides complete libraries for control and data flow analysis, which is needed if you want to do serious code transformations or refactorings.</p> <p>One of DMS's nicest properties is the ability to apply transformations stated using the syntax of your grammar, e.g., "if you see <em>this</em> (in my language) then replace it by <em>that</em>".</p> <p>You can see <a href="http://www.semdesigns.com/products/DMS/SimpleDMSDomainExample.html" rel="nofollow noreferrer">an example of defining lexer, parser, prettyprinter and transformation rules that define 9th grade algebra and a bit of calculus.</a> The rewrite rules are used to carry out simplifications and computing symbolic derivatives on algebraic formulas.</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.
 

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