Index: ppapi/generators/idl_parser.py |
diff --git a/ppapi/generators/idl_parser.py b/ppapi/generators/idl_parser.py |
index f1045c3bd0f7d23f2f9fe95830a971bd7c8b5b34..cb95a715ed2b631cbeefab38cb68f11697cc6f8b 100755 |
--- a/ppapi/generators/idl_parser.py |
+++ b/ppapi/generators/idl_parser.py |
@@ -221,6 +221,12 @@ class IDLParser(IDLLexer): |
p[0] = ListFromConcat(Copyright, Filedoc, p[3], p[4]) |
if self.parse_debug: DumpReduction('top', p) |
+ def p_top_short(self, p): |
+ """top : COMMENT ext_attr_block top_list""" |
+ Copyright = self.BuildComment('Copyright', p, 1) |
+ p[0] = ListFromConcat(Copyright, p[2], p[3]) |
+ if self.parse_debug: DumpReduction('top', p) |
+ |
# Build a list of top level items. |
def p_top_list(self, p): |
"""top_list : callback_decl top_list |
@@ -293,7 +299,7 @@ class IDLParser(IDLLexer): |
# |
def p_dictionary_block(self, p): |
"""dictionary_block : modifiers DICTIONARY SYMBOL '{' struct_list '}' ';'""" |
- p[0] = self.BuildNamed('Dictionary', p, 3, ListFromConcat(p[5])) |
+ p[0] = self.BuildNamed('Dictionary', p, 3, ListFromConcat(p[1], p[5])) |
# |
# Callback |
@@ -370,6 +376,29 @@ class IDLParser(IDLLexer): |
p[0] = ListFromConcat(self.BuildAttribute(p[1], 'True'), p[2]) |
if self.parse_debug: DumpReduction('ext_attribute_list', p) |
+ def p_ext_attr_list_values(self, p): |
asargent_no_longer_on_chrome
2012/06/12 19:08:16
I don't see you reference this p_ext_attr_list_val
benjhayden
2012/06/12 20:15:42
p_ext_attr_list_values() extends |ext_attr_list|.
|
+ """ext_attr_list : SYMBOL '=' '(' values ')' ext_attr_cont |
+ | SYMBOL '=' '(' symbols ')' ext_attr_cont""" |
+ p[0] = ListFromConcat(self.BuildAttribute(p[1], p[4]), p[6]) |
+ |
+ def p_values(self, p): |
+ """values : value values_cont""" |
+ p[0] = ListFromConcat(p[1], p[2]) |
+ |
+ def p_symbols(self, p): |
+ """symbols : SYMBOL symbols_cont""" |
+ p[0] = ListFromConcat(p[1], p[2]) |
+ |
+ def p_symbols_cont(self, p): |
+ """symbols_cont : ',' SYMBOL symbols_cont |
+ | """ |
+ if len(p) > 1: p[0] = ListFromConcat(p[2], p[3]) |
+ |
+ def p_values_cont(self, p): |
+ """values_cont : ',' value values_cont |
+ | """ |
+ if len(p) > 1: p[0] = ListFromConcat(p[2], p[3]) |
+ |
def p_ext_attr_cont(self, p): |
"""ext_attr_cont : ',' ext_attr_list |
|""" |
@@ -501,6 +530,11 @@ class IDLParser(IDLLexer): |
p[0] = p[1] |
if self.parse_debug: DumpReduction('expression_integer', p) |
+ def p_expression_float(self, p): |
asargent_no_longer_on_chrome
2012/06/12 19:08:16
Do you still need this? I don't see any literal fl
benjhayden
2012/06/12 20:15:42
Done.
|
+ "expression : FLOAT" |
+ p[0] = p[1] |
+ if self.parse_debug: DumpReduction('expression_float', p) |
+ |
# |
# Array List |
# |
@@ -555,7 +589,7 @@ class IDLParser(IDLLexer): |
def p_param_item(self, p): |
"""param_item : modifiers optional SYMBOL arrays identifier""" |
typeref = self.BuildAttribute('TYPEREF', p[3]) |
- children = ListFromConcat(p[1],p[2], typeref, p[4]) |
+ children = ListFromConcat(p[1], p[2], typeref, p[4]) |
p[0] = self.BuildNamed('Param', p, 5, children) |
if self.parse_debug: DumpReduction('param_item', p) |