summaryrefslogtreecommitdiffstats
path: root/mojo
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-26 19:22:21 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-26 19:22:21 +0000
commite0b4f8c851c5ef5c6a2e80613dcea3d1b3312d8c (patch)
tree5813daa613d2f7687bae6015b56b64d4665da438 /mojo
parent10955ac8846fedf178098b5318865711018eaa79 (diff)
downloadchromium_src-e0b4f8c851c5ef5c6a2e80613dcea3d1b3312d8c.zip
chromium_src-e0b4f8c851c5ef5c6a2e80613dcea3d1b3312d8c.tar.gz
chromium_src-e0b4f8c851c5ef5c6a2e80613dcea3d1b3312d8c.tar.bz2
Mojo: Mojom: Remove wchars and wstrings.
R=mpcomplete@chromium.org, darin@chromium.org Review URL: https://codereview.chromium.org/213063002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259656 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo')
-rw-r--r--mojo/public/bindings/pylib/parse/mojo_lexer.py12
-rwxr-xr-xmojo/public/bindings/pylib/parse/mojo_parser.py4
2 files changed, 1 insertions, 15 deletions
diff --git a/mojo/public/bindings/pylib/parse/mojo_lexer.py b/mojo/public/bindings/pylib/parse/mojo_lexer.py
index 56a45c9..3cbde0a 100644
--- a/mojo/public/bindings/pylib/parse/mojo_lexer.py
+++ b/mojo/public/bindings/pylib/parse/mojo_lexer.py
@@ -63,11 +63,9 @@ class Lexer(object):
'INT_CONST_DEC', 'INT_CONST_OCT', 'INT_CONST_HEX',
'FLOAT_CONST', 'HEX_FLOAT_CONST',
'CHAR_CONST',
- 'WCHAR_CONST',
# String literals
'STRING_LITERAL',
- 'WSTRING_LITERAL',
# Operators
'PLUS', 'MINUS', 'TIMES', 'DIVIDE', 'MOD',
@@ -129,7 +127,6 @@ class Lexer(object):
r"""(\\("""+simple_escape+'|'+decimal_escape+'|'+hex_escape+'))'
cconst_char = r"""([^'\\\n]|"""+escape_sequence+')'
char_const = "'"+cconst_char+"'"
- wchar_const = 'L'+char_const
unmatched_quote = "('"+cconst_char+"*\\n)|('"+cconst_char+"*$)"
bad_char_const = \
r"""('"""+cconst_char+"""[^'\n]+')|('')|('"""+ \
@@ -138,7 +135,6 @@ class Lexer(object):
# string literals (K&R2: A.2.6)
string_char = r"""([^"\\\n]|"""+escape_sequence+')'
string_literal = '"'+string_char+'*"'
- wstring_literal = 'L'+string_literal
bad_string_literal = '"'+string_char+'*'+bad_escape+string_char+'*"'
# floating constants (K&R2: A.2.5.3)
@@ -247,10 +243,6 @@ class Lexer(object):
def t_CHAR_CONST(self, t):
return t
- @TOKEN(wchar_const)
- def t_WCHAR_CONST(self, t):
- return t
-
@TOKEN(unmatched_quote)
def t_UNMATCHED_QUOTE(self, t):
msg = "Unmatched '"
@@ -261,10 +253,6 @@ class Lexer(object):
msg = "Invalid char constant %s" % t.value
self._error(msg, t)
- @TOKEN(wstring_literal)
- def t_WSTRING_LITERAL(self, t):
- return t
-
# unmatched string literals are caught by the preprocessor
@TOKEN(bad_string_literal)
diff --git a/mojo/public/bindings/pylib/parse/mojo_parser.py b/mojo/public/bindings/pylib/parse/mojo_parser.py
index cae92b9..8b00cf0 100755
--- a/mojo/public/bindings/pylib/parse/mojo_parser.py
+++ b/mojo/public/bindings/pylib/parse/mojo_parser.py
@@ -335,9 +335,7 @@ class Parser(object):
| FLOAT_CONST
| HEX_FLOAT_CONST
| CHAR_CONST
- | WCHAR_CONST
- | STRING_LITERAL
- | WSTRING_LITERAL"""
+ | STRING_LITERAL"""
p[0] = _ListFromConcat(*p[1:])
def p_error(self, e):