Skip to content
This repository has been archived by the owner on Jul 11, 2019. It is now read-only.

Updated grammar #27

Merged
merged 8 commits into from
Feb 7, 2017
Merged

Updated grammar #27

merged 8 commits into from
Feb 7, 2017

Conversation

pieterbos
Copy link
Member

@pieterbos pieterbos commented Feb 7, 2017

Lots of fixes:

  • refactored grammar so we can do 'true = false' and it will evaluate to false instead of being a syntax error. This also prepares it for other types like string operations
  • The < and <= operator did <= and < respectively
  • Added == and != operator precedence to make 1 < 2 = 3 < 5 evaluate to true without parentheses
  • Refactored the rules grammar to camelCase instead of snake_case because that's the ANTLR convention and snake_case produces very ugly looking java code.

@codecov-io
Copy link

codecov-io commented Feb 7, 2017

Codecov Report

Merging #27 into master will increase coverage by 0.21%.

@@             Coverage Diff              @@
##             master      #27      +/-   ##
============================================
+ Coverage     65.65%   65.86%   +0.21%     
- Complexity     1857     1882      +25     
============================================
  Files           309      309              
  Lines          6609     6644      +35     
  Branches        793      804      +11     
============================================
+ Hits           4339     4376      +37     
  Misses         1895     1895              
+ Partials        375      373       -2
Impacted Files Coverage Δ Complexity Δ
...n/java/com/nedap/archie/json/TimeDeserializer.java 60% <ø> (-40%) 2 <ø> (ø)
...va/com/nedap/archie/json/DateTimeDeserializer.java 60% <ø> (-40%) 2 <ø> (ø)
...n/java/com/nedap/archie/json/DateDeserializer.java 60% <ø> (-40%) 2 <ø> (ø)
...va/com/nedap/archie/json/DurationDeserializer.java 20% <ø> (-13.34%) 1 <ø> (ø)
...main/java/com/nedap/archie/rules/OperatorKind.java 100% <100%> (+14.28%) 6 <ø> (+1)
...a/com/nedap/archie/rules/evaluation/ValueList.java 84.05% <100%> (+4.34%) 29 <4> (+2)
...va/com/nedap/archie/adlparser/ADLParserErrors.java 64.7% <100%> (-1.97%) 10 <1> (-1)
...evaluation/evaluators/BinaryOperatorEvaluator.java 61.01% <61.53%> (+6.73%) 73 <8> (+16)
...edap/archie/adlparser/treewalkers/RulesParser.java 80.13% <78.82%> (-0.67%) 49 <17> (+4)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0dc9561...29e8658. Read the comment docs.

| multiplying_expression mult_binop pow_expression
multiplyingExpression
: powExpression
| multiplyingExpression mult_binop powExpression
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactor mult_binop to multBinop as well?

arithmetic_leaf:
boolean_literal
expressionLeaf:
booleanLiteral
| integer_value
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

integerValue

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has been defined in another file and cannot be refactored at the moment

arithmetic_leaf:
boolean_literal
expressionLeaf:
booleanLiteral
| integer_value
| real_value
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

realValue

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has been defined in another file and cannot be refactored at the moment

@pieterbos pieterbos merged commit 29e8658 into master Feb 7, 2017
@pieterbos pieterbos deleted the updated_grammar branch February 7, 2017 13:44
pieterbos added a commit that referenced this pull request Mar 20, 2018
Fix BMM tests to use BMM metamodels only, plus some fixes
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants