diff options
author | nbarth@chromium.org <nbarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-07 05:08:09 +0000 |
---|---|---|
committer | nbarth@chromium.org <nbarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-07 05:08:09 +0000 |
commit | 9f1b57f55544a0474f45ca5cf28f1f6032fda58d (patch) | |
tree | bb72e1d34c15fda7b30f0c8aaa59014021f8d9c4 /tools | |
parent | 37afc5df9c5d51051377715a758e8bc0f4fb0b4a (diff) | |
download | chromium_src-9f1b57f55544a0474f45ca5cf28f1f6032fda58d.zip chromium_src-9f1b57f55544a0474f45ca5cf28f1f6032fda58d.tar.gz chromium_src-9f1b57f55544a0474f45ca5cf28f1f6032fda58d.tar.bz2 |
IDL lexer: update integer regex to latest Web IDL spec
The regex for integers in Web IDL was just updated.
This doesn't change behavior, but improves clarity a bit.
This CL updates us to this new regex.
Relevant W3C bug:
Bug 19778 - Wrong regex for integer
https://www.w3.org/Bugs/Public/show_bug.cgi?id=19778
TEST=idl_lexer_test.py
Review URL: https://chromiumcodereview.appspot.com/22140002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@216080 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/idl_parser/idl_lexer.py | 2 | ||||
-rw-r--r-- | tools/idl_parser/test_lexer/values.in | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/tools/idl_parser/idl_lexer.py b/tools/idl_parser/idl_lexer.py index 9b92b3ec..c2569e9 100755 --- a/tools/idl_parser/idl_lexer.py +++ b/tools/idl_parser/idl_lexer.py @@ -115,7 +115,7 @@ class IDLLexer(object): return t def t_integer(self, t): - r'-?(0([Xx][0-9A-Fa-f]+|[0-7]*)|[1-9][0-9]*)' + r'-?([1-9][0-9]*|0[Xx][0-9A-Fa-f]+|0[0-7]*)' return t diff --git a/tools/idl_parser/test_lexer/values.in b/tools/idl_parser/test_lexer/values.in index cdd73b0..be714d0 100644 --- a/tools/idl_parser/test_lexer/values.in +++ b/tools/idl_parser/test_lexer/values.in @@ -44,7 +44,12 @@ float -1.0e-1 integer 00 integer 01 integer 0123 +integer 01234567 integer 123 +integer 1234567890 integer 0x123 +integer 0X123 +integer 0x1234567890AbCdEf +integer 0X1234567890aBcDeF identifier blah |