Am 08.03.2011 13:50, schrieb Christian Maeder:
Am 08.03.2011 13:35, schrieb Hauschild, Klaus (EXT):
Hi Christian,
Thank you for your help. Now the current version of Parse.hs
(http://code.google.com/p/hgmltracer/source/browse/trunk/hGmlTracer/src/Gml/Parse.hs)
works well for the test file
Am 09.03.2011 14:44, schrieb Christian Maeder:
Am 08.03.2011 13:50, schrieb Christian Maeder:
Am 08.03.2011 13:35, schrieb Hauschild, Klaus (EXT):
Hi Christian,
Thank you for your help. Now the current version of Parse.hs
Hi Christian,
my version of parseList works currently strange.
The input {2\n2} will be parsed fine, but something like { } or so fails
with 'expecting space or }'.
The redefinition of space is not necessary, it was copied from another tutorial
code. How I write a version of parseGml that get
Am 08.03.2011 12:30, schrieb Hauschild, Klaus (EXT):
Hi Christian,
my version of parseList works currently strange.
The input {2\n2} will be parsed fine, but something like { } or so fails
with 'expecting space or }'.
You must skip (possible) spaces after {, too. (Actually after every
In
http://code.google.com/p/hgmltracer/source/browse/trunk/hGmlTracer/src/Gml/Parse.hs
I see identifier - many (noneOf ). You should at least consume one
character by using many1! This also allows to call many parseGml''
later.
C.
Am 08.03.2011 12:30, schrieb Hauschild, Klaus (EXT):
Hi
Am 08.03.2011 12:30, schrieb Hauschild, Klaus (EXT):
Hi Christian,
my version of parseList works currently strange.
The input {2\n2} will be parsed fine, but something like { } or so fails
with 'expecting space or }'.
Also } (and ], etc.) should be excluded as identifier letters.
} is the
Hi Christian,
Thank you for your help. Now the current version of Parse.hs
(http://code.google.com/p/hgmltracer/source/browse/trunk/hGmlTracer/src/Gml/Parse.hs)
works well for the test file fact.gml.
Now the last thing is parsing the different numbers (integer and float). If
have a rule for
Am 08.03.2011 13:35, schrieb Hauschild, Klaus (EXT):
Hi Christian,
Thank you for your help. Now the current version of Parse.hs
(http://code.google.com/p/hgmltracer/source/browse/trunk/hGmlTracer/src/Gml/Parse.hs)
works well for the test file fact.gml.
Hi,
to solve this ICFP task http://www.cs.cornell.edu/icfp/task.htm I'm currnetly
working on the parser. With the hint from Thu (reading Phillip Wadlers monadic
parser paper) and consulting
http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours/Parsing I
produce a first working
You should parse keywords using:
keyword s = try (string s) notFollowedBy (letter | digit)
C.
Am 07.03.2011 11:34, schrieb Hauschild, Klaus (EXT):
Hi,
to solve this ICFP task _http://www.cs.cornell.edu/icfp/task.htm_ I'm
currnetly working on the parser. With the hint from Thu (reading
Thanks Christian,
I adapted the keyword parser and now n - negi does not occur.
But there are still other problems to solve. If I activate the parseFunction
the parser will answer to fact.gml unexpected end of input, expecting space or
}.
Any ideas?
-Ursprüngliche Nachricht-
Von:
Am 07.03.2011 13:48, schrieb Hauschild, Klaus (EXT):
Thanks Christian,
I adapted the keyword parser and now n - negi does not occur.
But there are still other problems to solve. If I activate the parseFunction
the parser will answer to fact.gml unexpected end of input, expecting space
Hi Klaus
Unless you have very specific white-space considerations, you really
want to be using Parsec's Token and LanguageDef modules.
There are examples in the legacy Parsec 2.0 distribution available
from Daan Leijen's old website:
http://legacy.cs.uu.nl/daan/parsec.html
Best wishes
Stephen
On Monday 07 March 2011 13:48:31, Hauschild, Klaus (EXT) wrote:
But there are still other problems to solve.
One thing that I saw which wasn't mentioned before (or I missed it) is that
you need to try parsing binders before parsing identifiers. Currently, all
binders are happily accepted as
Am 07.03.2011 14:20, schrieb Stephen Tetley:
Hi Klaus
Unless you have very specific white-space considerations, you really
want to be using Parsec's Token and LanguageDef modules.
Well, I would want to use Parsec's Token and LanguageDef modules just to
get the white spaces (and comments to
15 matches
Mail list logo