Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

SSLR stands for SonarSource Language Recognizer, this is a lightweight Java library which provides all the required material to analyse any piece of source code. For the time being, by using SSLR you can quickly create a lexer, a parser and some AST visitors to implement for instance some quality rules or to compute some measures. This library is already used in Sonar by the JavaScriptthe Java, JavaScript, COBOL, C#, Python, PL/SQL, C, C++, Flex, etc... plugins.

...

  • Easy integration and use
    • Just add a dependency on a jar file (or several jar according to what you want to use : lexer/parser, xpath, common rules, symbol table, ...)
    • No special step to add to the build process
    • No "untouchable" generated code
  • Everything in java
    • Definition of grammar and lexer directly in code using Java
    • No break in IDE support (syntax highlighting, code navigation, refactoring, etc)
  • Mature and production ready
    • This technology is already used in production to analyse millions of COBOL, PL/SQL, CJava, C, C#, ... lines of code
    • Awesome performances
  • Some common rules and basic metric computations available out-of-the-box
  • XPath library to query the AST
  • Toolkit to browse the AST of any source code and to evaluate XPath expressions on it

...