Mercurial > lcfOS
diff python/pyyacc.py @ 346:3bb7dcfe5529
expanded arm target
author | Windel Bouwman |
---|---|
date | Fri, 07 Mar 2014 17:05:32 +0100 |
parents | 4d204f6f7d4e |
children | 9667d78ba79e |
line wrap: on
line diff
--- a/python/pyyacc.py Sun Mar 02 17:12:08 2014 +0100 +++ b/python/pyyacc.py Fri Mar 07 17:05:32 2014 +0100 @@ -288,6 +288,7 @@ self.dotpos = dotpos assert self.dotpos <= len(self.production.symbols) self.look_ahead = look_ahead + self._is_shift = self.dotpos < len(self.production.symbols) def getdata(self): """ Gets the members as a tuple """ @@ -304,12 +305,12 @@ @property def IsReduce(self): """ Check if this item has the dot at the end """ - return self.dotpos == len(self.production.symbols) + return not self._is_shift @property def IsShift(self): """ Check if this item is a shift item, i.e. the dot can proceed """ - return self.dotpos < len(self.production.symbols) + return self._is_shift @property def Next(self):