Fixes and unit test for Java Properties parser

This commit is contained in:
BoykoAlex
2016-10-31 19:42:27 -04:00
parent c9a8bb2f3c
commit 23aefb7c2c
8 changed files with 183 additions and 118 deletions

View File

@@ -31,7 +31,7 @@ propertyLine
;
commentLine
: Space* Comment (LineBreak | EOF)
: Space* (Exclamation | Number) ~(LineBreak)* (LineBreak | EOF)
;
emptyLine
@@ -57,7 +57,9 @@ separatorAndValue
valueChar
: IdentifierChar
| Space
| Exclamation
| Number
| Space
| Backslash LineBreak
| Equals
| Colon
@@ -66,10 +68,8 @@ valueChar
Backslash : '\\';
Colon : ':';
Equals : '=';
Comment
: ('!' | '#') ~('\r' | '\n')*
;
Exclamation: '!';
Number : '#';
LineBreak
: '\r'? '\n'
@@ -83,6 +83,5 @@ Space
;
IdentifierChar
: ~([ :=\\\r('\r'? '\n')])
: ~(' ' | ':' | '=' | '\r' | '\n' )
;