|About finding the start symbol of a grammar firstname.lastname@example.org (Eduardo Costa) (2021-05-21)|
|Re: About finding the start symbol of a grammar email@example.com (Kaz Kylheku) (2021-05-21)|
|Re: About finding the start symbol of a grammar DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2021-05-21)|
|Re: About finding the start symbol of a grammar firstname.lastname@example.org (2021-05-21)|
|Re: About finding the start symbol of a grammar email@example.com (Ev. Drikos) (2021-05-22)|
|RE: About finding the start symbol of a grammar firstname.lastname@example.org (Christopher F Clark) (2021-05-22)|
|Re: About finding the start symbol of a grammar email@example.com (gah4) (2021-05-22)|
|Date:||Sat, 22 May 2021 13:17:25 -0700 (PDT)|
|Injection-Info:||gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="83623"; mail-complaints-to="firstname.lastname@example.org"|
|Posted-Date:||27 May 2021 10:40:19 EDT|
On Saturday, May 22, 2021 at 10:24:24 AM UTC-7, Christopher F Clark wrote:
> As Dodi noted, this is basically a graph analysis problem and the
> graph may be disconnected (a forest). And our moderator has added
> several insightful comments. E.g. you can "declare" a start symbol
> and if not present default to some symbol, either the first one in the
> grammar, or some symbol from which all other symbols are reachable
> (presuming the graph isn't disconnected), and the start symbol can be
> recursively defined, etc.
Seems to me that this should be related to the problem of finding the
root of a phylogenetic tree.
Unlike CS trees, there is no necessary directionality to the links, and so
finding the root is more difficult. Yet biologists have some desire to
know where the root is.
But as also noted above, in the case of recursion, it depends on the language.
In most languages, <expression> is recursive, allowing for
'(' <expression> ')'
however, a language (though I don't know of any) could require all expressions
to be parenthesized, in which case the start would be the parenthesized form.
[I think previous messagees have made it clear that while this is an
interesting exercise, its only practical use is to see if the start
symbol declared in the grammar is different from the computed one, in
which case the grammar is broken. -John]
Return to the
Search the comp.compilers archives again.