Skip to content

Commit

Permalink
Add missing hex value
Browse files Browse the repository at this point in the history
  • Loading branch information
christoph2 committed Jan 23, 2019
1 parent da61b3e commit 5d777f9
Show file tree
Hide file tree
Showing 6 changed files with 2,523 additions and 4,669 deletions.
9 changes: 9 additions & 0 deletions pydbc/ldf.g4
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,10 @@ signal_representation_entry:
** Lexer.
**
*/

intValue:
i = INT
| h = HEX
;

floatValue:
Expand Down Expand Up @@ -439,6 +441,13 @@ INT:
SIGN? '0'..'9'+
;

HEX:
'0'('x' | 'X') HEX_DIGIT+
;

fragment
HEX_DIGIT : ('0'..'9'|'a'..'f'|'A'..'F') ;

fragment
ESC_SEQ:
'\\' (
Expand Down
4 changes: 2 additions & 2 deletions pydbc/ldfListener.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ def exitPhysical_range(self, ctx):
maxValue = ctx.maxValue.value
#scale = ctx.scale.value if ctx.scale else None
#offset = ctx.offset.value
scale = ctx.scale
offset = ctx.offset
scale = ctx.s.value
offset = ctx.o.value
ctx.value = dict(min = minValue, max = maxValue, scale = scale, offset = offset)

def exitBcd_value(self, ctx):
Expand Down
5 changes: 4 additions & 1 deletion pydbc/ncf.g4
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,10 @@ free_text_definition:
'}'
;



intValue:
i = INT
i = INT
| h = HEX
;

Expand Down Expand Up @@ -344,6 +346,7 @@ FLOAT:
)
;


INT:
SIGN? '0'..'9'+
;
Expand Down
Loading

0 comments on commit 5d777f9

Please sign in to comment.