【发布时间】:2009-04-05 23:17:00
【问题描述】:
给出由字符 a、b 和 c 组成的语言 L 的 EBNF 规范,使得该语言中的句子具有以下形式
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.
到目前为止我所拥有的:
L -> S
S -> {a}{b}Q
Q ->
如果这是正确的,我仍然不确定如何从Q 生成以及如何反向表示S。
【问题讨论】:
-
请自己做功课。
-
为什么?你不喜欢帮助学生?
-
我们这里不做人家作业,但我们愿意提供帮助。 John 让我们了解了他在哪里卡住了,因此可以掌握在不给他解决方案的情况下什么样的建议会有所帮助......