Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
synkarius committed Oct 23, 2019
1 parent b2514f7 commit aa13b6a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion castervoice/lib/ctrl/mgr/rule_maker/mapping_rule_maker.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class MappingRuleMaker(BaseRuleMaker):
def __init__(self, t_runner, smr_configurer):
self._transformers_runner = t_runner
self._smr_configurer = smr_configurer
self._name_uniquefier = 0

def create_non_ccr_grammar(self, managed_rule):
details = managed_rule.get_details()
Expand All @@ -24,6 +25,9 @@ def create_non_ccr_grammar(self, managed_rule):
context = None
if details.executable is not None or details.title is not None:
context = AppContext(executable=details.executable, title=details.title)
grammar = Grammar(details.grammar_name, context=context)
self._name_uniquefier += 1
counter = "g" + str(self._name_uniquefier)
grammar_name = counter if details.grammar_name is None else details.grammar_name + counter
grammar = Grammar(name=grammar_name, context=context)
grammar.add_rule(rule_instance)
return grammar

0 comments on commit aa13b6a

Please sign in to comment.