Give the EBNF specification for the language L
that is made up of the chars a
, b
and c
such that sentences in the language have the form
L : sqsR
-s is a string of any combination of the characters a and b
-sR is that same string s reversed
-q is an odd number of c's followed by either an odd number of b's
or an even number of a’s.
What I have so far:
L -> S
S -> {a}{b}Q
Q ->
If this is right, I'm still not really sure how to produce from Q
and also how to represent S
in reverse.
Any help is welcomed :)