Skip to content

Commit

Permalink
Added an important note about matrices.
Browse files Browse the repository at this point in the history
  • Loading branch information
nrubin29 committed Oct 23, 2017
1 parent 2e46eb7 commit d57b0fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def _fixed(self, node):
del node.matched[i]

# This flattens rules with a single matched rule.
# TODO: Flattening messes up smaller matrices ([1], [1,2], [1|2], etc.).
if len(node.matched) is 1 and isinstance(node.matched[0], RuleMatch):
return self._fixed(node.matched[0])

Expand Down
4 changes: 2 additions & 2 deletions common.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ def key_at(self, i):
rules_map = ImmutableIndexedDict((
('asn', ('IDT EQL mat',)),
('mat', ('LBR mbd RBR',)),
('mbd', ('mrw PPE mbd',)),
('mrw', ('add CMA mrw',)),
('mbd', ('mrw PPE mbd', 'mrw')),
('mrw', ('add CMA mrw', 'add')),
('add', ('mul ADD add',)),
('mui', ('pow mul',)),
('mul', ('pow MUL mul',)),
Expand Down

0 comments on commit d57b0fa

Please sign in to comment.