-
Hi,
When I try to run the demo example in the package, the following error occurs:
p = pygold.Parser('simplecalculator.cgt','utf-8')
File "C:\Python25\lib\site-packages\pygold\Parser.py", line 100, in __init__
self.loadTables(filename)
File "C:\Python25\lib\site-packages\pygold\Parser.py", line 365, in loadTables
reader = GrammarReader(filename...
2008-12-31 15:01:05 UTC by hosseinyounesi
-
The bug is in the handling of empty rules #1967806 The solution (unchecked as far as I can see is to change the funciton popTokensInto)
TokenStack::popTokensInto
2008-05-20 14:16:44 UTC by osharon
-
In a grammar that defines optional rules (see SQL-ANSI-89.grm) the number of rules can be greatly reduced by defining rules that may be empty.
::=
|
However the rule can sometimes contain no token on the stack when it is reduced.
The problem in the code is in the method Parser::reduce
the rule length is obviously 0...
2008-05-20 09:15:45 UTC by osharon
-
I found the following:
in GrammerReader::readString (line 67) the following:
result.append(char) raises a TypeError since char is a byte array and result is expected unicode strings.
I believe that result.fromstring(char) should be used
in Parser::__fixCaseTrue (line 317)
string.lower(chars) should be replaced with chars.lower()
2008-05-19 08:27:24 UTC by nobody
-
I had to import string in parser.py to get it to work.
I then have run into another problem.
Stack trace as follows.
-----------------------------------------
>python Main.py
Token: select
Token: 1
Token: from
Reduction: Value
Reduction: Factor
Reduction: Term
Reduction: ValueExpression
Reduction: PredicateExp
Reduction: Not Exp
Reduction: And Exp
Reduction: Or Exp.
2007-02-21 10:45:46 UTC by nickleaton
-
Anonymous committed patchset 1 of module CVSROOT to the pygold CVS repository, changing 11 files.
2004-03-31 23:12:24 UTC by nobody
-
registered the pygold project.
2004-03-31 21:53:04 UTC by