Re: languages



quote:

Try starting with this production. This generates the language
L={a^(2n): n >= 0}

S->aSa | lambda


So from this I know the langage is equal number of a's. Therefore
aa,aaaa,etc will be accepted. So from here is where I need to add the
b* so that it will accept the first langauge with addition of b* in the
middle.

From that I believe the correct grammar is of the form:

S-> aSa | B | lambda
B-> bB | lambda

.



Relevant Pages

  • Re: languages
    ... S-> aBa ... which is not in the language. ... The problem is the production B->S, so drop this and change the ...
    (comp.theory)
  • Re: languages
    ... another hint. ... Try starting with this production. ... This generates the language ... S->aSa | lambda ...
    (comp.theory)
  • Re: map/filter/reduce/lambda opinions and background unscientific mini-survey
    ... Python language, while "function" etc are not, but they are certainly ... Just as exposure to functional languages would make lambda very familiar. ... > a letter of the greek alphabet. ... There is nothing about the word "string" that especially brings to mind ...
    (comp.lang.python)
  • Re: Minimal keywords needed for constructing a full CL system
    ... whole universe using lambda ... Remember we're not talking about creating a new language here, ... rather than dumping an image you compile an executable, ... That probably helps a tree shaker very little. ...
    (comp.lang.lisp)
  • Re: Multiline lamba implementation in python.
    ... lot about lambda and found no one of the alternative proposals ... If he's actually interested in a language feature he fixes ... Python returns to the topic every once in a while. ... half of the Python community screamed in Perl Angst. ...
    (comp.lang.python)