构造下列文法的FIRST和FOLLOW集
构造下列文法的FIRST和FOLLOW集
参考答案和解析
{ n , ( , t , f }
相关考题:
From the end of the first paragraph we know that ________.A. children are more friendly to strangersB. American schools are not safe for kidsC. children often follow their parents’ behaviorD. fighting each other is part of children’s nature
Which of the following can best explain Judy Garland’s words?A. Be your true self rather than follow others.B. Don’t copy others or you can’t be the first class.C. Make efforts to be the first instead of the second.D. Don’t learn from others unless they’re excellent.
给定文法G[S]及其非终结符A,FIRST(A)定义为:从A出发能推导出的终结符号的集合(S是文法的起始符号,为非终结符)。对于文法G[S]: S→[L]|a L→L,S|S 其中,G[S]包含的4个终结符号分别为: a , [ ] 则FIRST(S)的成员包括(48)。A.aB.a、[C.a、[和]D.a、[、]和,
在形式语言中,文法G是一个四元组G=(VN,Vr,P,Z),其中VN为(6)。若文法C的产生式集P为:(1)Z→Bc (2)Z→Zc (3)B→Ab (4)B→Bb (5)A→Aa (6)A→a则文法G是(7)文法,识别G的自动机为(8)。对于G来说,(9)为文法G可接受的字符串,(10)为文法G不可接受的字符串。供选择的答案:A.状态标志符B.开始符C.语句集D.非终结符集合
The main feature of(72)is that they follow a first-come/first-served rule. For instance, the line of(73)waiting to be run on a computer system.A.looplinksB.queuesC.stacksD.trees
若项目集IK含有A→α.,则在状态k时,仅当面临的输入符号a∈FOLLOW(A)时,才采取“A→α.”动作的一定是(19)。A.LALR 文法B.LR(0)文法C.CLR(1)文法D.SLR(1)文法
单选题设有文法G[S]为S→AB|bC,A→ε|b,B→ε|aD,C→AD|b,D→aS|c则FOLLOW与A的函数为()A{a,c,#}B{c,#}C{a,#}D{#}