Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

内核项与项的核心,两个不同的定义 #10

Open
acodercc opened this issue Nov 2, 2014 · 0 comments
Open

内核项与项的核心,两个不同的定义 #10

acodercc opened this issue Nov 2, 2014 · 0 comments
Assignees

Comments

@acodercc
Copy link
Owner

acodercc commented Nov 2, 2014

我们讲内核项(kernel item),是基于项集A,经过goto(A, a)计算的直接结果项集,所有项的dotPosition在symbol-a的后面,dotPosition后面的symbol我们称为dotSymbol,dotSymbol可能是非终结符,也可能是终结符。

而对项集进行闭包运算后,新增的那些对dotSymbol为非终结符时,基于dotSymbol的各个产生式创建的dotPosition为0的项,都是非内核项。。

而我们说的项的核心(core),是指LR1项中,产生式和dotPosition。。不包括LR1-Item的lookaheads符号,就是项的核心。

项的核心(core)这个概念,一般只用在合并LR1项集族中拥有相同核心的项集,成为LALR项集族时。

@acodercc acodercc self-assigned this Nov 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant