Share

pygold

Code

Programming Languages: Python

License: zlib/libpng License

Repositories

browse code, statistics, last commit on 2004-03-31 cvs -d:pserver:anonymous@pygold.cvs.sourceforge.net:/cvsroot/pygold login

cvs -z3 -d:pserver:anonymous@pygold.cvs.sourceforge.net:/cvsroot/pygold co -P modulename

Show:

What's happening?

  • unicode problem

    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

  • Comment: Error message

    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

  • Reduction of empty rules destroys the token stack

    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

  • pygold is not compatible with Python 2.5

    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

  • Error message

    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

  • pygold

    Anonymous committed patchset 1 of module CVSROOT to the pygold CVS repository, changing 11 files.

    2004-03-31 23:12:24 UTC by nobody

  • pygold

    registered the pygold project.

    2004-03-31 21:53:04 UTC by

Our Numbers