Re: [stack] Is this language concatenative?

Michael Nedzelsky <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
On Tue, 1 May 2007 07:00 pm, William Tanksley, Jr wrote:
> Michael Nedzelsky <[email protected]> wrote:
> > > But a quotation is not a member of T*, is it? Therefore it's not a
> > > "simple program".
> >
> > It is a member if T*!
> > T* means the set of all sequences of terminal symbols, and '[', ']' are
> > terminal symbols.
>
> Oh. Then no, I don't think your definition is adequate; it admits all
> ill-formed strings, such as "]]]]a]]]". Your grammar can't be parsed.
Which grammar??
My definition is about languages, i.e. subsets of T*.

I'll try to explain by example.

Example 1.

Terminal symbols: a, b, [, ], +, (, )
Production rules:
S --> e | a | b | S S | [ S ] | (S + S)

Let l be the language which generated by this grammar.
Then we have "]]]]a]]]" \in T*, but "]]]]a]]]" \notin L.
The set of all simple programs for language L is generated by the following 
grammar
S1 --> a | b| [S] (S+S)
S --> e | a | b | S S | [ S ] | (S + S)
Examples of simple programs: a, b, [], (a+b), [a b],(+), (a+(+)), (+b)
The last three programs looks strange, but they are syntactically valid.
The language L is (syntactically) concatenative by my defintion, since all the 
three requirements are satisfied.

Example 2.

Terminal symbols: a, b, [, ], +
Production rules:
S --> e | ab | ba | a |  S S | [ S ]

Let l be the language which generated by this grammar.
The set of all simple programs for language L is generated by the following 
grammar
S1 --> a | ab| ba | [S]
S --> e | ab | ba | a |  S S | [ S ]
Examples of simple programs: a,ab, ba, [], [ab], [a]
The language L is not (syntactically) concatenative by my defintion, since the 
third requirement is not satisifed: the program
aba \in L can be factored in simple two different ways: "a" "ab" and  "a" 
"ba".

 Michael Nedzelsky



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/concatenative/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/concatenative/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.