Jason Dagit wrote:
> > reserved "units." <|> reserved "unit."
>
> I always struggle with when I need to use 'try' with parsec.
>
> My understanding is that if 'unit.' appears in the input the first
> parser will parse up to the '.' and then fail and consume the input up
> to that point, leaving
On 5/20/06, Udo Stenzel <[EMAIL PROTECTED]> wrote:
do power
colon
integer
reserved "Supply centers,"
integer
reserved "Units:"
((reserved "Builds" >> return id) <|>
(reserved "Disbands" >> return negate))
`ap` integer
reserved "units." <|> reserved "unit."
Evan Martin wrote:
> Here's the beginning of
> the file, where it's not obvious to me how to distinguish elements in
> the "::" section from the rest of the file.
> :: Judge: USDP Game: dip Variant: standard
> :: Deadline: F1901M Mon 20 Feb 2006 20:00 PST
> :: URL: http://www.diplom.org/dpjudg
On May 19, 2006, at 6:35 PM, Evan Martin wrote:
For a toy project I want to parse the output of a program. The
program runs on someone else's machine and mails me the results, so I
only have access to the output it generates,
Unfortunately, the output is intended to be human-readable, and this
On 5/21/06, Evan Martin <[EMAIL PROTECTED]> wrote:
Thanks! I had looked at using the lexeme parser before but it didn't
seem like you can make newlines significant.
Upon further consideration I realized that you can mix lexeme-based
parsers with "plain" parsers. I think I've mostly figured th
On 5/21/06, Udo Stenzel <[EMAIL PROTECTED]> wrote:
do power
colon
integer
reserved "Supply centers,"
integer
reserved "Units:"
((reserved "Builds" >> return id) <|>
(reserved "Disbands" >> return negate))
`ap` integer
reserved "units." <|> reserved "unit."
Co
Evan Martin wrote:
> Unfortunately, the output is intended to be human-readable, and this
> makes parsing it a bit of a pain. Here are some sample lines from its
> output:
>
> France: Army Marseilles SUPPORT Army Paris -> Burgundy.
> Russia: Fleet St Petersburg (south coast) -> Gulf of Bothnia.
>
Hello Evan,
Saturday, May 20, 2006, 5:35:15 AM, you wrote:
> France: Army Marseilles SUPPORT Army Paris -> Burgundy.
> Russia: Fleet St Petersburg (south coast) -> Gulf of Bothnia.
> England: 4 Supply centers, 3 Units: Builds 1 unit.
> The next phase of 'dip' will be Movement for Fall of
For a toy project I want to parse the output of a program. The
program runs on someone else's machine and mails me the results, so I
only have access to the output it generates,
Unfortunately, the output is intended to be human-readable, and this
makes parsing it a bit of a pain. Here are some