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

bnf需要支持一类特殊的符号,是对受限token的支持,对之后出现的token的描述。 #15

Open
acodercc opened this issue Dec 13, 2014 · 0 comments
Assignees

Comments

@acodercc
Copy link
Owner

https://github.com/takumi4ichi/caliburn 项目的分号补全,以及除法TOKEN和正则TOKEN的区分,以及lookheadno(FUNCTION, {)而增加该功能需求。

比如

program ->
  line;
line ->
  NUMBER ';'
| IDENT [noLineTerminator] '++';
;

可以看出,这个接受以下句子:

123;
abc++;

abc是一个IDENT,但是和下一个token_++_之间,出现了[noLineTerminator],所以执行一些特殊的语法动作,来对自动插入分号的需求进行支持。

该功能从 @jsinjs 中学习。
[div]
[noLineTerminator]
[lookaheadno{{,function}]

@acodercc acodercc self-assigned this Dec 13, 2014
@acodercc acodercc changed the title bnf需要支持一类特殊的符号,这种符号预示解析到这个状态时,需要执行特定动作代码 bnf需要支持一类特殊的符号,这种符号是对之前符号的修饰。 Dec 16, 2014
@acodercc acodercc changed the title bnf需要支持一类特殊的符号,这种符号是对之前符号的修饰。 bnf需要支持一类特殊的符号,是对受限token的支持,对之后出现的token的描述。 Dec 19, 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