Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JFlexException improvement and lexer's lists verification #86

Merged
merged 27 commits into from
Aug 28, 2017

Conversation

WaldoFR
Copy link

@WaldoFR WaldoFR commented Aug 25, 2017

Changelog

  • JFlexException thrown by lexers has been improved to : ( Lex files should throw more informative exception on failure #50 )
    • Raise the following information from failure :
      • Checker identifier;
      • Parsed file;
      • Line & Column of the parser;
      • Last word parsed with the value of each character of the string causing the failure. This can be usefull to detect problems from carriage return or form-feed which can't be seen by the user reading the exception.
    • Throw a more informative message using raised information.
  • Analyzer was corrected to fully re-throw JFlexException from CallableChecker using java.util.concurrent.ExecutionException.
  • AnalysisHandler dialogMessage were improved to show the full message from JFlexException
  • Shell were edited to throw JFlexException when reaching ERROR STATE. For 44 of them, this was causing execution problem which had to be fixed by editing some other state. There is still 3 shell lexers which do not throw JFlexException when reaching ERROR STATE :
    • COM.NAME.Homonymy
    • COM.DATA.Initialisation
    • COM.FLOW.Recursion
  • Arrays, list, and stack use of the 185 lexers were checked and corrected when required to avoid OutOfBoundArrayException. ( Out of bound arrays in Lex files #47 )

Omar WALDMANN added 27 commits August 22, 2017 16:37
+ JFlexException can raise filename, line, columns, error message, last
parsed word and rule causing failure
+ Lexers now raise more details on encoding failure
+ JFlexException messages are now shown in i-Code UI
+ JFlexException contains a function to display the information message
with raised elements.
+ Shell rules (except the COMFLOWRecusion, COMNAMEHomonymy,
COMDATAInitialisation) do throw JFlexException when reaching error
state.
+ i-Code UI warning messageDialog was improved.
+ AbstractChecker contains a function to translate string into decimal
values of each character in it. This is useful to display information
when form feed or carriage return from non-Unix encoding files are
causing analysis failures.
+ Analyzer was edited to rethrow JFlexExceptions thrown from
CallableCheckers using ExecutionException from java.util.concurrent
@dupuisa dupuisa merged commit 106b070 into cnescatlab:V3-dev Aug 28, 2017
begarco pushed a commit to begarco/i-CodeCNES that referenced this pull request Jan 25, 2020
JFlexException improvement and lexer's lists verification
begarco pushed a commit that referenced this pull request Feb 2, 2020
JFlexException improvement and lexer's lists verification
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants