1 / 7

SableCC

SableCC. SableCC is developed by professors and graduate students at McGill University and is open source (licensed under the Apache License, Version 2.0 ) ‏. SableCC. SableCC is a compiler generator that generates compilers in Java, but can also output code in C, C++, C#, and Python.

lyre
Download Presentation

SableCC

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SableCC • SableCC is developed by professors and graduate students at McGill University and is open source (licensed under the Apache License, Version 2.0)‏

  2. SableCC • SableCC is a compiler generator that generates compilers in Java, but can also output code in C, C++, C#, and Python. • SableCC is written in Java itself and is cross-platform. • SableCC has its own format for input grammars.

  3. SableCC • Target language specification • Generation of scanner and parsercode in java or desired output language • Code for actions to be executedby scanner and parser, possiblymodifying their behavior throughinheritance. • Main program that makes calls togenerated compiler classes • Compilation of complete compiler

  4. SableCC • Compilers generated by SableCC build an abstract syntax tree while parsing the code. • The AST generated by the compiler matches the concrete syntax tree of the code, but can be modified by classes inheriting from the generated parser class.

  5. SableCC • Dynamic Linking and cross-platform execution leads to slow execution. • SableCC seeks to make Java programs run faster and to gain insight into its execution.

  6. SableCC • Claim that typical lexer generators limit the usable alphabet to the ASCII character set. SableCC supports Unicode. • SableCC allows for a larger alphabet by defining symbols as intervals of charaters and creating an alphabet that just fits the needs. • LALR(1) based parser • Automatic AST generation

  7. SableCC • Future additions: • Lookahead for FSA • Improvement to lexer, parser, and debugging • Flexible code generation • Automated error recovery

More Related