Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个印象,但我不完全确定它是正确的。如果语法没有歧义,它会不会有 First/Follow 冲突?我相当肯定它不能,但我想得到一些确认。
谢谢你。
明确的语法可能有先/后冲突。这是一个例子:
S → 抗体 A → B | ε
S → 抗体
A → B | ε
该文法可以产生两个字符串,bc和bbc,并且是明确的。但是,生产 A → b | 上存在 FIRST/FOLLOW 冲突 ε,因为b∈ FIRST(A) 和b∈ FOLLOW(A) 也是如此。
bc
bbc
b
希望这可以帮助!