Skip to content

Commit

Permalink
Punting on handling strings at the parser/lexer level.
Browse files Browse the repository at this point in the history
This grammar will not return properly cleaned up strings as defined in 12.5.3.
Users of this grammar will have to clean up strings at the application code
level.  I haven't managed to figure out a proper way to deal with it in the
parser or lexer.

refs #2
  • Loading branch information
godber committed Jan 18, 2015
1 parent 1a4db86 commit 206e12b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion antlr_grammar/ODLv21.g4
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ IDENTIFIER
;

// STRING corresponds to quoted_text
// FIXME: Use Lexer Mode to handle formatting inside string
// NOTE: This rule will return strings that contain newlines and spaces which
// are not compliant with 12.5.3.1. Strings must be massaged at the
// application level to make them compliant with 12.5.3.1.
STRING
: '"' ~["]*? '"'
;
Expand Down

0 comments on commit 206e12b

Please sign in to comment.