Added straight-string optimization to regex, converted a bit more of the grammer

This commit is contained in:
Nathan Braswell
2016-05-10 01:23:37 -04:00
parent 4d31ca8b0f
commit 133bf29cdf
2 changed files with 40 additions and 17 deletions

View File

@@ -154,8 +154,8 @@ augmented_alpha_alphanumeric = alpha_alphanumeric augmented_alpha_alphanumeric |
numeric = "[0-9]+" ;
# note the hacks around \things. Hmm, I feel like it actually shouldn't be like this. Added \\\* because I want to come back later
string = triple_quoted_string | "\"(`|[0-9]|-|=| |[a-z]|\[|]|(\\\\)|(\\n)|(\\t)|(\\\*)|(\\0)|;|'|
|,|.|/|~|!|@|#|$|%|^|&|\*|\(|\)|_|\+|[A-Z]|{|}|\||:|<|>|\?| |(\\\"))*\"" ;
string = triple_quoted_string | "\"([#-[]| |[]-~]|(\\\\)|(\\n)|(\\t)|(\\\*)|(\\0)|
|[ -!]|(\\\"))*\"" ;
comment = cpp_comment | c_comment ;
cpp_comment = "//[ -~]*
" ;