home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.tools
- Path: sparky!uunet!mcsun!sun4nl!utrcu1!infnews!kervel
- From: kervel@cs.utwente.nl (Rinie Kervel)
- Subject: Re: Revolution or madness??
- Message-ID: <1992Sep15.220005.19648@cs.utwente.nl>
- Sender: usenet@cs.utwente.nl
- Nntp-Posting-Host: rijn
- Organization: University of Twente, Dept. of Computer Science
- References: <1992Sep13.193749.12198@cs.utwente.nl>
- Date: Tue, 15 Sep 1992 22:00:05 GMT
- Lines: 51
-
-
-
- > Revolution in Parsing ?? (C) August 17, 1992 Rinie Kervel
- > e-mail: kervel@cs.utwente.nl
-
- >Either I am insane or I have uncovered a flaw in compiler theory.
- >As a result I have devised a new parsing method that has it all:
-
- Ok, I'll add a little teaser:
-
- 'The Book' [Aho,Sethi & Ullman] says:
-
- you need regular expressions and DFA for scanning
-
- Many implementators say:
-
- That's way too slow for such a simple job:
- strings are characters enclosed in ".." 's
-
- identifiers are letters followed by letters or digits
- It's easily to handcoded.
-
- 'The Book' says:
- You need trees for parsing (page 28-29)
-
- I say:
- They are clumsy and expensive because:
- They use a lot of memory,
- can only be walked sequentially,
- you lose the overview (and get a lot of bugs)
-
- Consider how you answer these questions when looking at the code,
- and how you code this in the parser:
-
- How many times is this variable used ?
- How many returns, gotos etc.. does this function have ?
- Are there 'return;' and return <value> statements ?
- How many parameters does this function call have ?
-
- I claim to do it simpler.
-
- Please answer by e-mail:
-
- kervel@cs.utwente.nl
-
- or write to (please announce through e-mail):
-
- Rinie Kervel
- Campuslaan 27-206
- NL 7522 NC Enschede
- Netherlands
-