| OLD | NEW |
| 1 # Copyright 2013 the V8 project authors. All rights reserved. | 1 # Copyright 2013 the V8 project authors. All rights reserved. |
| 2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
| 3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
| 4 # met: | 4 # met: |
| 5 # | 5 # |
| 6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
| 7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
| 8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
| 9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
| 10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 | 196 |
| 197 eos <|terminate|> | 197 eos <|terminate|> |
| 198 default_action <do_token_and_go_forward(ILLEGAL)> | 198 default_action <do_token_and_go_forward(ILLEGAL)> |
| 199 | 199 |
| 200 <<DoubleQuoteString>> | 200 <<DoubleQuoteString>> |
| 201 "\\" line_terminator_sequence <set_has_escapes||continue> | 201 "\\" line_terminator_sequence <set_has_escapes||continue> |
| 202 /\\[x][:hex_digit:]{2}/ <set_has_escapes||continue> | 202 /\\[x][:hex_digit:]{2}/ <set_has_escapes||continue> |
| 203 /\\[u][:hex_digit:]{4}/ <set_has_escapes||continue> | 203 /\\[u][:hex_digit:]{4}/ <set_has_escapes||continue> |
| 204 /\\[1-7]/ <octal_inside_string||continue> | 204 /\\[1-7]/ <octal_inside_string||continue> |
| 205 /\\[0-7][0-7]+/ <octal_inside_string||continue> | 205 /\\[0-7][0-7]+/ <octal_inside_string||continue> |
| 206 /\\[^xu1-7:line_terminator:]/ <set_has_escapes||continue> | 206 "\\0" <set_has_escapes||continue> |
| 207 /\\[^xu0-7:line_terminator:]/ <set_has_escapes||continue> |
| 207 "\\" <|token(ILLEGAL)|> | 208 "\\" <|token(ILLEGAL)|> |
| 208 line_terminator <|token(ILLEGAL)|> | 209 line_terminator <|token(ILLEGAL)|> |
| 209 "\"" <|token(STRING)|> | 210 "\"" <|token(STRING)|> |
| 210 eos <|terminate_illegal|> | 211 eos <|terminate_illegal|> |
| 211 catch_all <||continue> | 212 catch_all <||continue> |
| 212 | 213 |
| 213 <<SingleQuoteString>> | 214 <<SingleQuoteString>> |
| 214 # TODO subgraph for '\' | 215 # TODO subgraph for '\' |
| 215 "\\" line_terminator_sequence <set_has_escapes||continue> | 216 "\\" line_terminator_sequence <set_has_escapes||continue> |
| 216 /\\[x][:hex_digit:]{2}/ <set_has_escapes||continue> | 217 /\\[x][:hex_digit:]{2}/ <set_has_escapes||continue> |
| 217 /\\[u][:hex_digit:]{4}/ <set_has_escapes||continue> | 218 /\\[u][:hex_digit:]{4}/ <set_has_escapes||continue> |
| 218 /\\[1-7]/ <octal_inside_string||continue> | 219 /\\[1-7]/ <octal_inside_string||continue> |
| 219 /\\[0-7][0-7]+/ <octal_inside_string||continue> | 220 /\\[0-7][0-7]+/ <octal_inside_string||continue> |
| 220 /\\[^xu1-7:line_terminator:]/ <set_has_escapes||continue> | 221 "\\0" <set_has_escapes||continue> |
| 222 /\\[^xu0-7:line_terminator:]/ <set_has_escapes||continue> |
| 221 "\\" <|token(ILLEGAL)|> | 223 "\\" <|token(ILLEGAL)|> |
| 222 line_terminator <|token(ILLEGAL)|> | 224 line_terminator <|token(ILLEGAL)|> |
| 223 "'" <|token(STRING)|> | 225 "'" <|token(STRING)|> |
| 224 eos <|terminate_illegal|> | 226 eos <|terminate_illegal|> |
| 225 catch_all <||continue> | 227 catch_all <||continue> |
| 226 | 228 |
| 227 <<Identifier>> | 229 <<Identifier>> |
| 228 identifier_char <|token(IDENTIFIER)|continue> | 230 identifier_char <|token(IDENTIFIER)|continue> |
| 229 /\\u[:hex_digit:]{4}/ <{ | 231 /\\u[:hex_digit:]{4}/ <{ |
| 230 if (V8_UNLIKELY(!ValidIdentifierPart())) { | 232 if (V8_UNLIKELY(!ValidIdentifierPart())) { |
| 231 goto default_action; | 233 goto default_action; |
| 232 } | 234 } |
| 233 next_.has_escapes = true; | 235 next_.has_escapes = true; |
| 234 }|token(IDENTIFIER)|continue> | 236 }|token(IDENTIFIER)|continue> |
| 235 | 237 |
| 236 <<SingleLineComment>> | 238 <<SingleLineComment>> |
| 237 line_terminator <|line_terminator|> | 239 line_terminator <|line_terminator|> |
| 238 eos <|skip_and_terminate|> | 240 eos <|skip_and_terminate|> |
| 239 catch_all <||continue> | 241 catch_all <||continue> |
| 240 | 242 |
| 241 <<MultiLineComment>> | 243 <<MultiLineComment>> |
| 242 /\*+\// <|skip|> | 244 /\*+\// <|skip|> |
| 243 # TODO find a way to generate the below rule | 245 # TODO find a way to generate the below rule |
| 244 /\*+[^\/*]/ <||continue> | 246 /\*+[^\/*]/ <||continue> |
| 245 line_terminator <line_terminator_in_multiline_comment||continue> | 247 line_terminator <line_terminator_in_multiline_comment||continue> |
| 246 eos <|terminate_illegal|> | 248 eos <|terminate_illegal|> |
| 247 catch_all <||continue> | 249 catch_all <||continue> |
| OLD | NEW |