Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions jflex/Scanner.jflex
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ frac = {dot}{digit}+
scientific_notation = {exp}{digit}+
any_number = {integer}{frac}?{scientific_notation}?

//Accept any unicode character except certain control characters
string = [^(\\)(\")(\/)(\b)(\f)(\n)(\r)(\t)(\u)]+
// Accept zero (empty string) or more valid characters (i.e. any UNICODE
// character except for unescaped quotation marks ("), backslashes (\), or
// control characters /u0000 through to /u001f) or valid escape sequences
string = ([^\u0000-\u001F\"\\]|(\\([\"\\/bfnrt]|(u([0-9a-fA-F]{4})))))*

%%

//Scan for commas, square brackets, braces and colons
Expand Down