Versions Compared


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


  • If you extend "org.sonar.sslr.toolkit.AbstractConfigurationModel", then make sure to override method "getCharset".
  • Migration to new Grammar API is highly recommended, because most likely old API will be marked as deprecated in next release and fully removed later. Tip on migration: create new grammar (all tests pass as they don't depend on this grammar), migrate tests for grammar (they should pass), migrate the rest (AST Visitors and so on).
  • To refactor the previous rule names (camel case) to the enum naming convention (all caps and underscores), do: 1) For all rules, insert the underscores by using the Eclipse rename binding, 2) then, for all rules, apply the rename binding immediately followed by the "to upper case" one.

SSLR 1.17

  • Behavioral: UnknownCharacterChannel can't be used to consume BOM character - use new BOMCharacterChannel.
  • Behavioral: In grammars for lexerless parsing no need to use "GrammarOperators.token", but mandatory to use "GrammarOperators.commentTrivia" for comments and "GrammarOperators.skippedTrivia" for white spaces.
  • Deprecation: Some methods for navigation in AstNode. Especially pay attention on "hasChildren" and "findChildren".
  • Deprecation: The toolkit parser and list of tokenizers is no more provided to the constructor of the "Toolkit" class. Instead, one must extend the "AbstractConfigurationModel" class, where the "doGetParser()" and "doGetTokenizer()" methods will be called when a parser for the current configuration is needed.
  • Distribution of Toolkit should embed "" instead of "" and thus it will have bigger size.


  • Deprecation: Replace "GrammarFunctions.Standard.or(" by "GrammarFunctions.Standard.firstOf(". In most cases you should be able to do this by using "find text and replace".
  • Deprecation:  Replace hamcrest matchers by fest-assertions. In order to quickly replace all assertThat(p, parse("XXXXXX")); by assertThat(p).matches("XXXXXXX"); you can use the following regular expression to do a search and replace (tested in Eclipse by Julien Henry):
  • Find: (?s)assertThat\(p\,\sparse\((.*?)\)\)\;
  • Replace with: assertThat(p).matches($1);
  • You can do the same for notParse => notMatches
  • (Dinesh) I actually recommend to replace Replace the hamcrest parse() and notParse() matches by Fest ones: Use a global regular expression based find & replace: "assertThat\(p, parse\((.*?)\)\);" by ".matches\($1\)" and add the assertThat(Parser) and final semicolon manually. The end-result looks betterDo the same for notParse().

SSLR 1.15

  • Source: Replace artifactId "sslr-devkit" by "sslr-toolkit".