hankd@ecn.purdue.edu (Hank Dietz) (10/18/90)
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.