shwaresyst <shwares...@aol.com> wrote: > No, you only lex up to the newline or EOF in the first pass, whether the > ending ')' or other context delimeter is found or not, because after the > newline may be an io_here body. This is the recognition phase that skips > aliases, and the grammar currently has no ambiguities in this regard so it > can be lexed. It doesn't even matter if the newline is supposed to be > retained in the token because a single quote didn't have it's ending quote > yet, the recognition stops there. There probably should be a numbered item > about how various keywords establish lexical sub contexts too, but it is > accounted for in Item 5 by 'any recursion necessary'.
Did you ever try to write a working shell using lexical parsing for $(...) only? I did write a working shell based on a clean recursive parsing method and if you look at: https://www.in-ulm.de/~mascheck/various/cmd-subst/ you'll see that bosh/mksh/ksh93 that all use a clean recursive parser are closest to the expected behavior. Shells that try the lecial only parsing way for $(...), miserably fail. Jörg -- EMail:jo...@schily.net (home) Jörg Schilling D-13353 Berlin joerg.schill...@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.org/private/ http://sf.net/projects/schilytools/files/'