Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!world!esegue!compilers-sender From: hankd@ecn.purdue.edu (Hank Dietz) Newsgroups: comp.compilers Subject: Precise definition of "syntax diagram" Keywords: parse, LL(1) Message-ID: <9010180639.AA10335@dynamo.ecn.purdue.edu> Date: 18 Oct 90 06:39:40 GMT References: <9010091533.AA02386@apple.com> <9010101445.AA06181@dynamo.ecn.purdue.edu> <1990Oct16.015524.25858@comp.vuw.ac.nz> Sender: compilers-sender@esegue.segue.boston.ma.us Reply-To: hankd@ecn.purdue.edu (Hank Dietz) Organization: Purdue University Engineering Computer Network Lines: 30 Approved: compilers@esegue.segue.boston.ma.us In article <1990Oct16.015524.25858@comp.vuw.ac.nz> lindsay@comp.vuw.ac.nz (Lindsay Groves) writes: >In article <9010101445.AA06181@dynamo.ecn.purdue.edu>, >hankd@dynamo.ecn.purdue.edu (Hank Dietz) writes: >|> Pascal is generally defined using a set of syntax diagrams which, by >|> definition, means the language can be recognized using LL(1). > >You must be using a strange definition a syntax diagrams if they can >only describe languages that have LL(1) grammars. The rule I have heard is that a syntax diagram is literally a flowchart for an LL(1) parser where the branching decisions are obvious, hence the branch decision nodes are omitted. This was certainly true of all syntax diagrams I saw earlier, but I have more recently seen "syntax diagrams" which are no more constrained than arbitrary CFGs + looping, and differ from them only in having arrows between symbols. E.g., is the following a legal syntax diagram for S -> S a, S -> b? S --+-->[S]---->(a)--+--> | | +-->(b)--------->+ I believe it isn't. Right or wrong? References, anyone? -hankd@ecn.purdue.edu PS: The unconstrained form looks more like a RTN to me.... -- Send compilers articles to compilers@esegue.segue.boston.ma.us {ima | spdcc | world}!esegue. Meta-mail to compilers-request@esegue.