refs Additions to meta-data tests.
@@ -11,7 +11,7 @@ def test_production_meta_data():
grammar_str = r'''
MyRule: 'a' {left, 1, dynamic, nops,
- label:'My Label',
+ some_string:'My Label',
some_bool: true,
some_int: 3,
some_float: 4.5};
@@ -24,7 +24,7 @@ def test_production_meta_data():
assert prod.assoc == ASSOC_LEFT
assert prod.prior == 1
assert prod.dynamic
- assert prod.label == 'My Label'
+ assert prod.some_string == 'My Label'
assert prod.some_bool is True
assert prod.some_int == 3
assert prod.some_float == 4.5
@@ -150,6 +150,8 @@ def test_multiple_rule_meta_override():
my_rule = grammar.get_nonterminal('MyRule')
# User meta-data is accessible on non-terminal
+ # Rule level meta-data are only those defined on the
+ # first rule in the order of the definition.
assert my_rule.label == 'My Label'
assert len(my_rule.productions) == 4
