Bug 1317180, part 2 - Remove really old ~ syntax error for MessageId in IPDL parser. r=billm
MessageId has the production "'~' ID", but if you use it, it produces
an error. This error was added in 2009, in
bug 525342. I doubt anybody
expects it to work any more, so it should just be a regular parse
error. This is the only usage of the literal ~ so it can now be
removed from there.
MozReview-Commit-ID: AivlLE8Nubv
--- a/ipc/ipdl/ipdl/parser.py
+++ b/ipc/ipdl/ipdl/parser.py
@@ -153,17 +153,17 @@ reserved = set((
'using',
'verify'))
tokens = [
'COLONCOLON', 'ID', 'STRING',
] + [ r.upper() for r in reserved ]
t_COLONCOLON = '::'
-literals = '(){}[]<>;:,~'
+literals = '(){}[]<>;:,'
t_ignore = ' \f\t\v'
def t_linecomment(t):
r'//[^\n]*'
def t_multilinecomment(t):
r'/\*(\n|.)*?\*/'
t.lexer.lineno += t.value.count('\n')
@@ -520,22 +520,19 @@ def p_MessageBody(p):
msg.addOutParams(p[3])
msg.addModifiers(p[4])
p[0] = msg
def p_MessageId(p):
"""MessageId : ID
| __DELETE__
- | DELETE
- | '~' ID"""
+ | DELETE"""
loc = locFromTok(p, 1)
- if 3 == len(p):
- _error(loc, "sorry, `%s()' destructor syntax is a relic from a bygone era. Declare `__delete__()' in the `%s' protocol instead", p[1]+p[2], p[2])
- elif 'delete' == p[1]:
+ if 'delete' == p[1]:
_error(loc, "`delete' is a reserved identifier")
p[0] = [ loc, p[1] ]
def p_MessageInParams(p):
"""MessageInParams : '(' ParamList ')'"""
p[0] = p[2]
def p_MessageOutParams(p):