home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / mswindo / programm / tools / 964 < prev    next >
Encoding:
Text File  |  1992-09-15  |  1.7 KB  |  64 lines

  1. Newsgroups: comp.os.ms-windows.programmer.tools
  2. Path: sparky!uunet!mcsun!sun4nl!utrcu1!infnews!kervel
  3. From: kervel@cs.utwente.nl (Rinie Kervel)
  4. Subject: Re: Revolution or madness??
  5. Message-ID: <1992Sep15.220005.19648@cs.utwente.nl>
  6. Sender: usenet@cs.utwente.nl
  7. Nntp-Posting-Host: rijn
  8. Organization: University of Twente, Dept. of Computer Science
  9. References: <1992Sep13.193749.12198@cs.utwente.nl>
  10. Date: Tue, 15 Sep 1992 22:00:05 GMT
  11. Lines: 51
  12.  
  13.  
  14.  
  15. >    Revolution in Parsing ?? (C) August 17, 1992 Rinie Kervel
  16. >    e-mail: kervel@cs.utwente.nl
  17.         
  18. >Either I am insane or I have uncovered a flaw in compiler theory.
  19. >As a result I have devised a new parsing method that has it all:
  20.  
  21. Ok, I'll add a little teaser:
  22.  
  23. 'The Book' [Aho,Sethi & Ullman] says:
  24.  
  25.     you need regular expressions and DFA for scanning
  26.  
  27. Many implementators say:
  28.  
  29.     That's way too slow for such a simple job:
  30.         strings are characters enclosed in ".." 's
  31.             
  32.         identifiers are letters followed by letters or digits
  33.     It's easily to handcoded.
  34.  
  35. 'The Book' says:
  36.     You need trees for parsing (page 28-29)
  37.  
  38. I say:
  39.     They are clumsy and expensive because:
  40.         They use a lot of memory,
  41.         can only be walked sequentially,
  42.         you lose the overview (and get a lot of bugs)
  43.  
  44.     Consider how you answer these questions when looking at the code,
  45.     and how you code this in the parser:
  46.  
  47.         How many times is this variable used ?
  48.         How many returns, gotos etc.. does this function have ?
  49.         Are there 'return;' and return <value> statements ?
  50.         How many parameters does this function call have ?
  51.  
  52.     I claim to do it simpler.
  53.     
  54. Please answer by e-mail:
  55.  
  56.     kervel@cs.utwente.nl
  57.  
  58. or write to (please announce through e-mail):
  59.  
  60.     Rinie Kervel
  61.     Campuslaan 27-206
  62.     NL 7522 NC Enschede
  63.     Netherlands
  64.