| 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 22 matching lines...) Expand all Loading... |
| 33 digit = [0-9]; | 33 digit = [0-9]; |
| 34 hex_digit = [0-9a-fA-F]; | 34 hex_digit = [0-9a-fA-F]; |
| 35 single_escape_char = ['"\\bfnrtv]; | 35 single_escape_char = ['"\\bfnrtv]; |
| 36 maybe_exponent = /([eE][\-+]?[:digit:]+)?/; | 36 maybe_exponent = /([eE][\-+]?[:digit:]+)?/; |
| 37 number = | 37 number = |
| 38 /0[xX][:hex_digit:]+/ | ( | 38 /0[xX][:hex_digit:]+/ | ( |
| 39 /\.[:digit:]+/ maybe_exponent | | 39 /\.[:digit:]+/ maybe_exponent | |
| 40 /[:digit:]+(\.[:digit:]*)?/ maybe_exponent ); | 40 /[:digit:]+(\.[:digit:]*)?/ maybe_exponent ); |
| 41 # TODO this is incomplete/incorrect | 41 # TODO this is incomplete/incorrect |
| 42 line_terminator_sequence = (/\n\r?/)|(/\r\n?/); | 42 line_terminator_sequence = (/\n\r?/)|(/\r\n?/); |
| 43 eof = [:eof:]; |
| 43 | 44 |
| 44 # grammar is | 45 # grammar is |
| 45 # regex <action_on_state_entry|action_on_match|transition> | 46 # regex <action_on_state_entry|action_on_match|transition> |
| 46 # | 47 # |
| 47 # actions can be c code enclosed in {} or identifiers to be passed to codegen | 48 # actions can be c code enclosed in {} or identifiers to be passed to codegen |
| 48 # transition must be in continue or the name of a subgraph | 49 # transition must be in continue or the name of a subgraph |
| 49 | 50 |
| 50 <<default>> | 51 <<default>> |
| 51 "|=" <|push_token(ASSIGN_BIT_OR)|> | 52 "|=" <|push_token(ASSIGN_BIT_OR)|> |
| 52 "^=" <|push_token(ASSIGN_BIT_XOR)|> | 53 "^=" <|push_token(ASSIGN_BIT_XOR)|> |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 eof <|skip_and_terminate|> | 230 eof <|skip_and_terminate|> |
| 230 catch_all <||continue> | 231 catch_all <||continue> |
| 231 | 232 |
| 232 <<MultiLineComment>> | 233 <<MultiLineComment>> |
| 233 /\*+\// <|skip|> | 234 /\*+\// <|skip|> |
| 234 # TODO find a way to generate the below rule | 235 # TODO find a way to generate the below rule |
| 235 /\*+[^\/*]/ <||continue> | 236 /\*+[^\/*]/ <||continue> |
| 236 line_terminator <push_line_terminator||continue> | 237 line_terminator <push_line_terminator||continue> |
| 237 eof <|{start_ = marker_; BACKWARD(); PUSH_TOKEN(Token::ILLEGAL);}|> | 238 eof <|{start_ = marker_; BACKWARD(); PUSH_TOKEN(Token::ILLEGAL);}|> |
| 238 catch_all <||continue> | 239 catch_all <||continue> |
| OLD | NEW |