[Haskell-cafe] [Parsec] No identEnd in ParsecToken?

2006-09-05 Thread Stephane Bortzmeyer
I'm trying to use Parsec for a language which have identifiers where the '-' character is allowed only inside identifiers, not at the start or the end. ParsecToken has identStart to tell that the '-' is not allowed at the start but I find no equivalent identEnd? I tried also to express the same

Re: [Haskell-cafe] [Parsec] No identEnd in ParsecToken?

2006-09-05 Thread Malcolm Wallace
Stephane Bortzmeyer [EMAIL PROTECTED] wrote: identifier = do start - letter rest - many (alphaNum | char '-') end - letter return ([start] ++ rest ++ [end]) ? characters authorized for identifiers because the parser created by many is greedy: it consumes

Re: [Haskell-cafe] [Parsec] No identEnd in ParsecToken?

2006-09-05 Thread Chris Kuklewicz
Stephane Bortzmeyer wrote: I'm trying to use Parsec for a language which have identifiers where the '-' character is allowed only inside identifiers, not at the start or the end. ParsecToken has identStart to tell that the '-' is not allowed at the start but I find no equivalent identEnd? I

Re: [Haskell-cafe] [Parsec] No identEnd in ParsecToken?

2006-09-05 Thread Udo Stenzel
Stephane Bortzmeyer wrote: I'm trying to use Parsec for a language which have identifiers where the '-' character is allowed only inside identifiers, not at the start or the end. identifier = do start - letter rest - many (alphaNum | char '-') end - letter return