Hi,
I have a case of a language that uses a line based syntax.
Here is an example: ' label1 => any kind of text on many lines label2 => more text on many lines label3 => more text'
This should get 3 key-value pairs.
My current solution goes like this: key := #newline asParser , ('=>' asParser / #newline asParser) negate star , '=>' asParser. p := (key trimBlanks, key negate star flatten) star.
However, this is quite ugly. One idea to make it simpler would be to have a parser for the beginning of the line. What do you think?
Cheers, Doru
-- www.tudorgirba.com
"When people care, great things can happen."