| 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 if (V8_UNLIKELY(!ValidIdentifierStart())) { | 189 if (V8_UNLIKELY(!ValidIdentifierStart())) { |
| 190 goto default_action; | 190 goto default_action; |
| 191 } | 191 } |
| 192 }|token(IDENTIFIER)|Identifier> | 192 }|token(IDENTIFIER)|Identifier> |
| 193 | 193 |
| 194 eos <|terminate|> | 194 eos <|terminate|> |
| 195 default_action <do_token_and_go_forward(ILLEGAL)> | 195 default_action <do_token_and_go_forward(ILLEGAL)> |
| 196 | 196 |
| 197 <<DoubleQuoteString>> | 197 <<DoubleQuoteString>> |
| 198 "\\" line_terminator_sequence <||continue> | 198 "\\" line_terminator_sequence <||continue> |
| 199 /\\[x][:hex_digit:]{2}/ <||continue> | 199 /\\[x][:hex_digit:]{2}/ <set_has_escapes||continue> |
| 200 /\\[u][:hex_digit:]{4}/ <||continue> | 200 /\\[u][:hex_digit:]{4}/ <set_has_escapes||continue> |
| 201 /\\[^xu:line_terminator:]/ <||continue> | 201 /\\[^xu:line_terminator:]/ <set_has_escapes||continue> |
| 202 "\\" <|token(ILLEGAL)|> | 202 "\\" <|token(ILLEGAL)|> |
| 203 line_terminator <|token(ILLEGAL)|> | 203 line_terminator <|token(ILLEGAL)|> |
| 204 "\"" <|token(STRING)|> | 204 "\"" <|token(STRING)|> |
| 205 eos <|terminate_illegal|> | 205 eos <|terminate_illegal|> |
| 206 catch_all <||continue> | 206 catch_all <||continue> |
| 207 | 207 |
| 208 <<SingleQuoteString>> | 208 <<SingleQuoteString>> |
| 209 # TODO subgraph for '\' | 209 # TODO subgraph for '\' |
| 210 "\\" line_terminator_sequence <||continue> | 210 "\\" line_terminator_sequence <||continue> |
| 211 /\\[x][:hex_digit:]{2}/ <||continue> | 211 /\\[x][:hex_digit:]{2}/ <set_has_escapes||continue> |
| 212 /\\[u][:hex_digit:]{4}/ <||continue> | 212 /\\[u][:hex_digit:]{4}/ <set_has_escapes||continue> |
| 213 /\\[^xu:line_terminator:]/ <||continue> | 213 /\\[^xu:line_terminator:]/ <set_has_escapes||continue> |
| 214 "\\" <|token(ILLEGAL)|> | 214 "\\" <|token(ILLEGAL)|> |
| 215 line_terminator <|token(ILLEGAL)|> | 215 line_terminator <|token(ILLEGAL)|> |
| 216 "'" <|token(STRING)|> | 216 "'" <|token(STRING)|> |
| 217 eos <|terminate_illegal|> | 217 eos <|terminate_illegal|> |
| 218 catch_all <||continue> | 218 catch_all <||continue> |
| 219 | 219 |
| 220 <<Identifier>> | 220 <<Identifier>> |
| 221 identifier_char <|token(IDENTIFIER)|continue> | 221 identifier_char <|token(IDENTIFIER)|continue> |
| 222 /\\u[:hex_digit:]{4}/ <{ | 222 /\\u[:hex_digit:]{4}/ <{ |
| 223 if (V8_UNLIKELY(!ValidIdentifierPart())) { | 223 if (V8_UNLIKELY(!ValidIdentifierPart())) { |
| 224 goto default_action; | 224 goto default_action; |
| 225 } | 225 } |
| 226 next_.has_escapes = true; |
| 226 }|token(IDENTIFIER)|continue> | 227 }|token(IDENTIFIER)|continue> |
| 227 | 228 |
| 228 <<SingleLineComment>> | 229 <<SingleLineComment>> |
| 229 line_terminator <|line_terminator|> | 230 line_terminator <|line_terminator|> |
| 230 eos <|skip_and_terminate|> | 231 eos <|skip_and_terminate|> |
| 231 catch_all <||continue> | 232 catch_all <||continue> |
| 232 | 233 |
| 233 <<MultiLineComment>> | 234 <<MultiLineComment>> |
| 234 /\*+\// <|skip|> | 235 /\*+\// <|skip|> |
| 235 # TODO find a way to generate the below rule | 236 # TODO find a way to generate the below rule |
| 236 /\*+[^\/*]/ <||continue> | 237 /\*+[^\/*]/ <||continue> |
| 237 line_terminator <line_terminator||continue> | 238 line_terminator <line_terminator||continue> |
| 238 eos <|terminate_illegal|> | 239 eos <|terminate_illegal|> |
| 239 catch_all <||continue> | 240 catch_all <||continue> |
| OLD | NEW |