diff python/pyyacc.py @ 341:4d204f6f7d4e devel

Rewrite of assembler parts
author Windel Bouwman
date Fri, 28 Feb 2014 18:07:14 +0100
parents c7cc54c0dfdf
children 3bb7dcfe5529
line wrap: on
line diff
--- a/python/pyyacc.py	Sun Feb 23 16:24:01 2014 +0100
+++ b/python/pyyacc.py	Fri Feb 28 18:07:14 2014 +0100
@@ -266,7 +266,7 @@
 
 class Production:
     """ Production rule for a grammar """
-    def __init__(self, name, symbols, f=None):
+    def __init__(self, name, symbols, f):
         self.name = name
         self.symbols = symbols
         self.f = f
@@ -309,7 +309,7 @@
     @property
     def IsShift(self):
         """ Check if this item is a shift item, i.e. the dot can proceed """
-        return not self.IsReduce
+        return self.dotpos < len(self.production.symbols)
 
     @property
     def Next(self):