Versions Compared

Key

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

...

  1. Recompile your code with the next version of SSLR. If it can't be compiled, then don't hesitate to inform us.
  2. Check release notes and upgrade notes for the existence of behavioral incompatibilities (see below). If there are any, you should fix them by following the instructions in the notes. Good coverage of your code by unit tests is highly recommended (SonarQube can help you to enforce this), so you will be able to perform tests to verify that it behaves exactly as before upgrade. If not, then don't hesitate to ask for help.
  3. Remove uses of deprecated code by following the instructions you'll find in the deprecation Javadocs (SonarQube can help you to find such code). And don't forget to execute tests to verify that regressions were not introduced by such changes.

...

Anchor
Upgrade notes
Upgrade notes
Upgrade Notes

SSLR 1.

...

20

  • Source: sonar-channel from SonarQube is merged into SSLR. Change the package name "org.sonar.channel" into "org.sonar.sslr.channel" for lexing purposes. Depend on sslr-testing-harness instead of sonar-testing-harness for the lexer unit tests.
  • Deprecation: The preprocessor API classes Preprocessor, PreprocessorAction and PreprocessingDirective were deprecated with no drop-in replacements. There no longer will be a unified API for preprocessors.
  • Deprecation: The text API package "org.sonar.sslr.text" has been deprecated with no drop-in replacements. There no longer will be a common way to track the location of preprocessed source code.
  • Behavioral: Parse tree was removed from the parse error report.

SSLR 1.19.2

  • Source: Deprecated hamcrest matchers were removed in preference to Fest-assertions.
  • Behavioral: No No difference between usual grammar rule and "recovery rule" - both will be presented in AST and so can be handled via AST visitor. Thus ParseErrorCheck in SonarQube plugins must be reworked, if plugin uses "recovery rule".
  • Behavioral: Modifications made in grammar do not affect lexerless parser, which was created before those modifications.
  • Behavioral: Previously was possible to execute parser with grammar, which contains references on undefined rules, but now this is forbidden.
  • Behavioral: Replace AuditListener by AstScannerExceptionHandler to subscribe to errors
  • Deprecation: Old ways to construct Grammars were marked as deprecated - use Builders instead.

...

  • 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 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. Do the same for notParse().

SSLR 1.15

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

...