| 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 6104615f3fa7e6154036b0e8aa80c675297831c7..b890f232869fa596cb0854ed422634ca31d03ffc 100644
|
| --- a/mojo/public/tools/bindings/pylib/mojom/parse/lexer.py
|
| +++ b/mojo/public/tools/bindings/pylib/mojom/parse/lexer.py
|
| @@ -78,7 +78,7 @@ class Lexer(object):
|
| # Constants
|
| 'ORDINAL',
|
| 'INT_CONST_DEC', 'INT_CONST_HEX',
|
| - 'FLOAT_CONST',
|
| + 'FLOAT_CONST', 'FLOAT_BUILTIN',
|
|
|
| # String literals
|
| 'STRING_LITERAL',
|
| @@ -146,6 +146,8 @@ class Lexer(object):
|
| floating_constant = \
|
| '(((('+fractional_constant+')'+ \
|
| exponent_part+'?)|([0-9]+'+exponent_part+')))'
|
| + floating_builtin = \
|
| + r"""(((double)|(float))\.((NAN)|((NEGATIVE_)?INFINITY)))"""
|
|
|
| # Ordinals
|
| ordinal = r'@[0-9]+'
|
| @@ -200,6 +202,10 @@ class Lexer(object):
|
| def t_FLOAT_CONST(self, t):
|
| return t
|
|
|
| + @TOKEN(floating_builtin)
|
| + def t_FLOAT_BUILTIN(self, t):
|
| + return t
|
| +
|
| @TOKEN(hex_constant)
|
| def t_INT_CONST_HEX(self, t):
|
| return t
|
|
|