|Bill Allombert on Tue, 27 Aug 2002 19:08:47 +0200|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|Re: GP2C branch alpha-0-0-1-newparser|
On Sat, Jun 22, 2002 at 04:20:30PM +0200, Bill Allombert wrote: > Hello PARI developers, > > I commited my new GP2C parser to a new branch in the GP2C CVS. > The main purpose of this new parser is to parse 'automatic concatenation' > correctly. It also recognize '.' as 0. when it should. > Automatic concatenantion is what make print("x="x) valid. > > You can switch your gp2c tree to this branch with > cvs update -r alpha-0-0-1-newparser I have commited my changes in this branch. This new parser version seems to be almost 100% GP 2.2.4 compliant, with correct error reporting. The only know problems: -- % last value variable is not understood. -- f'() numerical derivation is not understood. This should not be difficult to handle, it is just that GP2C does not know what to do with them. Now we need to validate this parser. It is here that you can help. One way to do it is to check thath 'gp2c -G' is idempotent, i.e. that gp2c -G file.gp and gp2c -G file.gp | gp2c -G give the same output. The following can be used for the check. It is important we check as much GP scripts as we can before changing the GP parser. Cheers, Bill. ----------- #! /bin/sh -e TMP=/tmp/gp1 ./gp2c -G $1 >> $TMP TMP2=/tmp/gp2 ./gp2c -G $TMP >> $TMP2 diff -u $TMP $TMP2 exi=$? rm $TMP $TMP2 exit $?