Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!news.misty.com!news.iecc.com!nerds-end From: Uli Kusterer Newsgroups: comp.compilers Subject: Re: Writing parsers, was Good practical language and OS agnostic text? Date: Sun, 22 Apr 2012 16:18:32 +0200 Organization: Compilers Central Lines: 21 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <12-04-068@comp.compilers> References: <12-04-019@comp.compilers> <12-04-054@comp.compilers> NNTP-Posting-Host: news.iecc.com X-Trace: leila.iecc.com 1335105080 18081 64.57.183.58 (22 Apr 2012 14:31:20 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Sun, 22 Apr 2012 14:31:20 +0000 (UTC) Keywords: parse, tools Posted-Date: 22 Apr 2012 10:31:20 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:611 On 21.04.2012, at 10:53, Joe Schmo wrote: > I think the whole "write a grammar and feed it through a tool to produce a > lexer and parser" thing is something to avoid, at least at first (I'm > avoiding it like the plague, FWIW). While I generally think that compiler-compilers and parser and lexer generators are great domain-specific languages that help streamline the process (at least if your language fits in their constraints, which for example my pet language doesn't do), I also had huge problems using them at first. Without knowing the problems and the general approach that is taken when writing a parser, some of the things these tools do seem awfully roundabout and over-complicated. It helped me a lot to just write my own lexers and parsers, because then it suddenly became apparent what the problems *are* that these tools protect me from. Cheers, -- Uli Kusterer http://stacksmith.org