Precise definition of "syntax diagram" (Hank Dietz)
Thu, 18 Oct 90 01:39:40 -0500

          From comp.compilers

Related articles
Precise definition of "syntax diagram" (1990-10-18)
| List of all articles for this month |

Newsgroups: comp.compilers
From: (Hank Dietz)
Keywords: parse, LL(1)
Organization: Purdue University Engineering Computer Network
References: <> <> <>
Date: Thu, 18 Oct 90 01:39:40 -0500

In article <> (Lindsay Groves) writes:
>In article <>,
> (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)--+-->
        | |

I believe it isn't. Right or wrong? References, anyone?

PS: The unconstrained form looks more like a RTN to me....

Post a followup to this message

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