Index: mojo/public/tools/bindings/pylib/mojom/parse/lexer.py |
diff --git a/mojo/public/tools/bindings/pylib/mojom/parse/lexer.py b/mojo/public/tools/bindings/pylib/mojom/parse/lexer.py |
index 18d1b13c8c96819157fbc2c4267921b2f895e612..eff1bde118edcce971db22b66c8cb08da1b43c4f 100644 |
--- a/mojo/public/tools/bindings/pylib/mojom/parse/lexer.py |
+++ b/mojo/public/tools/bindings/pylib/mojom/parse/lexer.py |
@@ -120,12 +120,9 @@ class Lexer(object): |
hex_digits = '[0-9a-fA-F]+' |
# integer constants (K&R2: A.2.5.1) |
- integer_suffix_opt = \ |
- r'(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?' |
- decimal_constant = \ |
- '(0'+integer_suffix_opt+')|([1-9][0-9]*'+integer_suffix_opt+')' |
- octal_constant = '0[0-7]*'+integer_suffix_opt |
- hex_constant = hex_prefix+hex_digits+integer_suffix_opt |
+ decimal_constant = '0|([1-9][0-9]*)' |
+ octal_constant = '0[0-7]+' |
+ hex_constant = hex_prefix+hex_digits |
bad_octal_constant = '0[0-7]*[89]' |