Command language parsing

"Michael Durket" <GG.MPD@Forsythe.Stanford.EDU>
Fri, 1 Sep 89 10:21:21 PDT

          From comp.compilers

Related articles
Command language parsing GG.MPD@Forsythe.Stanford.EDU (Michael Durket) (1989-09-01)
| List of all articles for this month |

Date: Fri, 1 Sep 89 10:21:21 PDT
From: "Michael Durket" <GG.MPD@Forsythe.Stanford.EDU>

      What is the current state of command language parsing? Parsers
for interactive programs that I am familiar with are all ad hoc,
but I suspect that things aren't done that way anymore.

      Does anyone have suggestions for articles I should look at? I
would like to convert an old ad hoc parsing system into something
a little easier to maintain and a lot more modern.


          Michael Durket ARPA:
                                              BITNET: gg.mpd@stanford.bitnet

[The yacc manual has always had examples showing how you'd do line by line
parsing with some error recovery, so there's some stuff there. But I've
never seen any sort of comprehensive view of how you combine things like
command line editing, history, and filename completion along with the
underlying syntax of the language. There may be interesting work to be done
there. Also, about 10 years ago I wrote a paper in Sigplan about embedding
command languages in a real programming language like Lisp. At that time it
was evident to me that there is a tension between on the one hand wanting a
very simple syntax with no punctuation for simple commands, and on the other
hand wanting a more complex syntax to write more complicated stuff in
reasonable ways. The Bourne shell is as good a compromise in this regard as
I've seen, but even it has a funny two-level syntax with one syntax for the
commands it executes (normal commands and flow of control stuff like if and
case) and another syntax for executing those commands (monstrosities like
${foo:=`bar \`parp\``}.) I always wondered if there was a practical way to
unify those two syntax levels in a usable way, but never came up with
anything. -John]

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.