home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / theory / 1902 < prev    next >
Encoding:
Text File  |  1992-09-09  |  1.7 KB  |  34 lines

  1. Newsgroups: comp.theory
  2. Path: sparky!uunet!secapl!Cookie!frank
  3. From: frank@Cookie.secapl.com (Frank Adams)
  4. Subject: Re: What kind of an automaton is this?
  5. Message-ID: <1992Sep09.172553.127895@Cookie.secapl.com>
  6. Date: Wed, 09 Sep 1992 17:25:53 GMT
  7. References: <4QU69WW@math.fu-berlin.de>
  8. Organization: Security APL, Inc.
  9. Lines: 23
  10.  
  11. In article <4QU69WW@math.fu-berlin.de> dww@inf.fu-berlin.de writes:
  12. >We've been discussing on comp.compilers the kind of parsing automaton that is described in
  13. >DeRemer[CACM 71] as being an SLR-Parser. It is not the kind of PDA I
  14. >learned about when I studied Automata Theory with the next state and the
  15. >output being determined by the current state, the top of the stack, and
  16. >the current symbol in the input. In this "strange" automaton the lhs of
  17. >the production being reduced is returned to the input after the stack
  18. >has been popped. This is not just backing up over input, but non-terminals
  19. >can be built up on the input, perhaps with a number of epsilon productions.
  20. >Some people have said "oh yes, we like that and have a hack to use it"
  21. >but it is unclear what exactly the computational complexity of this
  22. >automaton is. LR parsing is clearly a subset of what this automaton can
  23. >do - just don't do any of the strange reductions. 
  24.  
  25. Such automata are in fact Turing-complete.  Regard the concatenation of the
  26. items on the stack and the "input" as a Turing-machine tape.  The machine
  27. can move forward by shifting symbols, and backward by special singleton
  28. reductions.  New tape can be added by epsilon-productions.  (This is just an
  29. outline of the construction, but it works.)
  30.  
  31. If you don't permit epsilon productions, you have the equivalent of a Turing
  32. machine with a bounded tape; hence exactly the context-sensitive languages
  33. can be recognized.
  34.