Re: [Haskell-cafe] how to get started: a text application

2004-06-25 Thread Max Ischenko
Graham Klyne wrote: On reflection, I think there's a strong case for doing it this way (i.e. with a separate tokenizer) in Haskell, even if the tokenization is very simple, because it helps to separate some of the character-level issues from the remaining program logic. Any spurious detail tha

Re: [Haskell-cafe] how to get started: a text application

2004-06-25 Thread Graham Klyne
At 16:14 25/06/04 +0300, Max Ischenko wrote: Many (most?) Wiki engines use straightforward regex substitution to convert the text source into HTML, rather than implement a lexer/parser/pretty-printer combination. Obviously this makes for a fairly simple implementation. Mind you, some of the regex's

Re: [Haskell-cafe] how to get started: a text application

2004-06-25 Thread Max Ischenko
Bayley, Alistair wrote: Markdown looks a lot like Wiki source to me i.e. it looks like the text source for a Wiki page. It seems to serve the same purpose i.e. well-formatted plain text intended for conversion to HTML. Exactly. Many (most?) Wiki engines use straightforward regex substitution to co

RE: [Haskell-cafe] how to get started: a text application

2004-06-25 Thread Bayley, Alistair
> From: Max Ischenko [mailto:[EMAIL PROTECTED] > > Well, yes. In Markdown, like in most other "rich-text" > formats symbols are overloaded a lot. After all, it has to > constrain itself to "plain text". > > I'm going to try a "two-stage tokenization" (not sure how to > name this correctly). B

Re: [Haskell-cafe] how to get started: a text application

2004-06-25 Thread Graham Klyne
At 15:17 24/06/04 +0300, Max Ischenko wrote: [...] The HaXml XML parser has a separate lexer, but it turns out that it's not always easy to get the tokenization right without having contextual information (e.g. from the syntax analyzer). (XML is rather messy in that way.) Well, yes. In Markdown,

Re: [Haskell-cafe] how to get started: a text application

2004-06-24 Thread Max Ischenko
Graham Klyne wrote: I think the first choice is whether to go for a separately identifiable lexing phase, rather than working directly from the raw text. Either might work, I think. Fhe first option (tokenization) is more appealing to me. The HaXml XML parser has a separate lexer, but it turns

Re: [Haskell-cafe] how to get started: a text application

2004-06-23 Thread Graham Klyne
At 16:53 22/06/04 +0300, Max Ischenko wrote: Hi all, I'm going to try to implement a version of Markdown tool[1] in Haskell. The application is rather simple: take a text file with some (simple) mark-up embedded in it and turn it into another text file, this time with XHTML markup. Cool project!

[Haskell-cafe] how to get started: a text application

2004-06-22 Thread Max Ischenko
Hi all, I'm going to try to implement a version of Markdown tool[1] in Haskell. The application is rather simple: take a text file with some (simple) mark-up embedded in it and turn it into another text file, this time with XHTML markup. I need some guidelines on how to get started. I'll have t