Skip to content

Commit

Permalink
apache#1674 bug fixs
Browse files Browse the repository at this point in the history
  • Loading branch information
codefairy08 committed Mar 19, 2019
1 parent ea87434 commit 281ea48
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,27 @@ lexer grammar DataType;

import Symbol, Alphabet;

STRING_: DQ_ ('\\"' | .)*? DQ_ | SQ_ (SQ_ | .)*? SQ_;
NUMBER_: MINUS_? INT_? DOT_? INT_ (E [+\-]? INT_)?;
HEX_DIGIT_: '0x' HEX_+ | 'X' SQ_ HEX_+ SQ_;
BIT_NUM_: '0b' ('0' | '1')+ | B SQ_ ('0' | '1')+ SQ_;

fragment INT_: [0-9]+;
fragment HEX_: [0-9a-fA-F];
STRING_
: ('"' ( '\\'. | '""' | ~('"'| '\\') )* '"')
| ('\'' ('\\'. | '\'\'' | ~('\'' | '\\'))* '\'')
;

NUMBER_
: MINUS_? INT_? DOT_? INT_ (E [+\-]? INT_)?
;

HEX_DIGIT_
: '0x' HEX_+ | 'X' SQ_ HEX_+ SQ_
;

BIT_NUM_
: '0b' ('0' | '1')+ | B SQ_ ('0' | '1')+ SQ_
;

fragment INT_
: [0-9]+
;

fragment HEX_
: [0-9a-fA-F]
;
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,27 @@ lexer grammar DataType;

import Symbol, Alphabet;

STRING_: DQ_ ('\\"' | .)*? DQ_ | SQ_ (SQ_ | .)*? SQ_;
NUMBER_: MINUS_? INT_? DOT_? INT_ (E [+\-]? INT_)?;
HEX_DIGIT_: '0x' HEX_+ | 'X' SQ_ HEX_+ SQ_;
BIT_NUM_: '0b' ('0' | '1')+ | B SQ_ ('0' | '1')+ SQ_;

fragment INT_: [0-9]+;
fragment HEX_: [0-9a-fA-F];
STRING_
: ('"' ( '\\'. | '""' | ~('"'| '\\') )* '"')
| ('\'' ('\\'. | '\'\'' | ~('\'' | '\\'))* '\'')
;

NUMBER_
: MINUS_? INT_? DOT_? INT_ (E [+\-]? INT_)?
;

HEX_DIGIT_
: '0x' HEX_+ | 'X' SQ_ HEX_+ SQ_
;

BIT_NUM_
: '0b' ('0' | '1')+ | B SQ_ ('0' | '1')+ SQ_
;

fragment INT_
: [0-9]+
;

fragment HEX_
: [0-9a-fA-F]
;
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,27 @@ lexer grammar DataType;

import Symbol, Alphabet;

STRING_: DQ_ ('\\"' | .)*? DQ_ | SQ_ (SQ_ | .)*? SQ_;
NUMBER_: MINUS_? INT_? DOT_? INT_ (E [+\-]? INT_)?;
HEX_DIGIT_: '0x' HEX_+ | 'X' SQ_ HEX_+ SQ_;
BIT_NUM_: '0b' ('0' | '1')+ | B SQ_ ('0' | '1')+ SQ_;

fragment INT_: [0-9]+;
fragment HEX_: [0-9a-fA-F];
STRING_
: ('"' ( '\\'. | '""' | ~('"'| '\\') )* '"')
| ('\'' ('\\'. | '\'\'' | ~('\'' | '\\'))* '\'')
;

NUMBER_
: MINUS_? INT_? DOT_? INT_ (E [+\-]? INT_)?
;

HEX_DIGIT_
: '0x' HEX_+ | 'X' SQ_ HEX_+ SQ_
;

BIT_NUM_
: '0b' ('0' | '1')+ | B SQ_ ('0' | '1')+ SQ_
;

fragment INT_
: [0-9]+
;

fragment HEX_
: [0-9a-fA-F]
;
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,27 @@ lexer grammar DataType;

import Symbol, Alphabet;

STRING_: DQ_ ('\\"' | .)*? DQ_ | SQ_ (SQ_ | .)*? SQ_;
NUMBER_: MINUS_? INT_? DOT_? INT_ (E [+\-]? INT_)?;
HEX_DIGIT_: '0x' HEX_+ | 'X' SQ_ HEX_+ SQ_;
BIT_NUM_: '0b' ('0' | '1')+ | B SQ_ ('0' | '1')+ SQ_;

fragment INT_: [0-9]+;
fragment HEX_: [0-9a-fA-F];
STRING_
: ('"' ( '\\'. | '""' | ~('"'| '\\') )* '"')
| ('\'' ('\\'. | '\'\'' | ~('\'' | '\\'))* '\'')
;

NUMBER_
: MINUS_? INT_? DOT_? INT_ (E [+\-]? INT_)?
;

HEX_DIGIT_
: '0x' HEX_+ | 'X' SQ_ HEX_+ SQ_
;

BIT_NUM_
: '0b' ('0' | '1')+ | B SQ_ ('0' | '1')+ SQ_
;

fragment INT_
: [0-9]+
;

fragment HEX_
: [0-9a-fA-F]
;

0 comments on commit 281ea48

Please sign in to comment.