| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 "===" <|push_token(EQ_STRICT)|> | 57 "===" <|push_token(EQ_STRICT)|> |
| 58 "==" <|push_token(EQ)|> | 58 "==" <|push_token(EQ)|> |
| 59 "=" <|push_token(ASSIGN)|> | 59 "=" <|push_token(ASSIGN)|> |
| 60 "!==" <|push_token(NE_STRICT)|> | 60 "!==" <|push_token(NE_STRICT)|> |
| 61 "!=" <|push_token(NE)|> | 61 "!=" <|push_token(NE)|> |
| 62 "!" <|push_token(NOT)|> | 62 "!" <|push_token(NOT)|> |
| 63 | 63 |
| 64 "//" <||SingleLineComment> | 64 "//" <||SingleLineComment> |
| 65 "/*" <||MultiLineComment> | 65 "/*" <||MultiLineComment> |
| 66 "<!--" <||HtmlComment> | 66 "<!--" <||SingleLineComment> |
| 67 |
| 68 "<!-" <|{ |
| 69 cursor_ -= 2; |
| 70 yych = *(cursor_); |
| 71 PUSH_TOKEN(Token::LT); |
| 72 yych = *(++cursor_); |
| 73 PUSH_TOKEN(Token::NOT); |
| 74 yych = *(++cursor_); |
| 75 PUSH_TOKEN(Token::SUB); |
| 76 }|> |
| 77 |
| 78 "<!" <|{ |
| 79 cursor_ -= 1; |
| 80 yych = *(cursor_); |
| 81 PUSH_TOKEN(Token::LT); |
| 82 yych = *(++cursor_); |
| 83 PUSH_TOKEN(Token::NOT); |
| 84 }|> |
| 85 |
| 67 | 86 |
| 68 "-->" <{ | 87 "-->" <{ |
| 69 if (!just_seen_line_terminator_) { | 88 if (!just_seen_line_terminator_) { |
| 89 yych = *(--cursor_); |
| 70 PUSH_TOKEN(Token::DEC); | 90 PUSH_TOKEN(Token::DEC); |
| 71 start_ = cursor_ - 1; | |
| 72 goto code_start; | 91 goto code_start; |
| 73 } | 92 } |
| 74 }||SingleLineComment> | 93 }||SingleLineComment> |
| 75 | 94 |
| 76 ">>>=" <|push_token(ASSIGN_SHR)|> | 95 ">>>=" <|push_token(ASSIGN_SHR)|> |
| 77 ">>>" <|push_token(SHR)|> | 96 ">>>" <|push_token(SHR)|> |
| 78 "<<=" <|push_token(ASSIGN_SHL)|> | 97 "<<=" <|push_token(ASSIGN_SHL)|> |
| 79 ">>=" <|push_token(ASSIGN_SAR)|> | 98 ">>=" <|push_token(ASSIGN_SAR)|> |
| 80 "<=" <|push_token(LTE)|> | 99 "<=" <|push_token(LTE)|> |
| 81 ">=" <|push_token(GTE)|> | 100 ">=" <|push_token(GTE)|> |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 <<SingleLineComment>> | 226 <<SingleLineComment>> |
| 208 line_terminator <|push_line_terminator|> | 227 line_terminator <|push_line_terminator|> |
| 209 eof <|skip_and_terminate|> | 228 eof <|skip_and_terminate|> |
| 210 catch_all <||continue> | 229 catch_all <||continue> |
| 211 | 230 |
| 212 <<MultiLineComment>> | 231 <<MultiLineComment>> |
| 213 "*/" <|skip|> | 232 "*/" <|skip|> |
| 214 # TODO find a way to generate the below rule | 233 # TODO find a way to generate the below rule |
| 215 /\*[^\/]/ <||continue> | 234 /\*[^\/]/ <||continue> |
| 216 line_terminator <push_line_terminator||continue> | 235 line_terminator <push_line_terminator||continue> |
| 236 eof <|skip_and_terminate|> |
| 217 catch_all <||continue> | 237 catch_all <||continue> |
| 218 | |
| 219 <<HtmlComment>> | |
| 220 "-->" <|skip|> | |
| 221 # TODO find a way to generate the below rules | |
| 222 /--./ <||continue> | |
| 223 /-./ <||continue> | |
| 224 line_terminator <push_line_terminator||continue> | |
| 225 catch_all <||continue> | |
| OLD | NEW |