下述 FOLLOW集构造方法中错误的是()。
A: 对文法开始符S,有
B: ⊂FOLLOW(S)
C: 若有A→αBβ,则有FIRST(β) -{ε}⊂FOLLOW(B)
D: 若有A→αB,则有FOLLOW(B) ⊂FOLLOW(A)
E: 若有A→αB,则有FOLLOW(A) ⊂FOLLOW(B)
A: 对文法开始符S,有
B: ⊂FOLLOW(S)
C: 若有A→αBβ,则有FIRST(β) -{ε}⊂FOLLOW(B)
D: 若有A→αB,则有FOLLOW(B) ⊂FOLLOW(A)
E: 若有A→αB,则有FOLLOW(A) ⊂FOLLOW(B)
举一反三
- 给定文法G(S):S → ABcA → a | εB → b | ε非终结符A的 FOLLOW集合是? FOLLOW (S)={ a,b,c,#}|FOLLOW (S)={ a,b,c }|FOLLOW(A)={b,c}|FOLLOW(A)={ c }
- Can you follow up with the teacher in the course? A: Very hard to follow B: A little hard to follow C: Appropriate D: Easy to follow E: Very easy to follow
- You<br/>can ______ the application with a phone call. A: follow B: follow through C: follow up D: follow on
- It is considered advisable to ___ an interview with a letter or a telephone call when you apply for a job. A: follow up B: follow out C: follow through D: follow on
- 已知文法G(S):T→ST’T’→,S T’|εS→(T)|+|bFIRST(S)={ b + ( } FOLLOW(S)={ , ) #}FIRST(T)={ b + (} FOLLOW(T)={ ) } FIRST(T’)={ , ε} FOLLOW(T’)={ ) }预测分析表为 b + , ( ) # S b (1) (2) T ST’ ST’ (3) T’ (4) T’→ ε 完善以上预测分析表(只需填产生式右部)