Skip to content

Commit

Permalink
添加测试 - 如果变量名带关键字, 语法分析报错
Browse files Browse the repository at this point in the history
  • Loading branch information
testacount1 committed Nov 27, 2017
1 parent 79c4acd commit cf0b63c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/com/program_in_chinese/圈2.g4
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ grammar 圈2;
声明 : 赋值 | 加 | 打印 ;

赋值 : '使' 标识符 '' (T数 | 标识符) ;
打印 : '打印'(T数 | 标识符) ;
打印 : '打印' (T数 | 标识符) ;
加 : '' (T数 | 标识符) '' 标识符 ;
标识符 : T标识符字符+ ;

Expand Down
4 changes: 4 additions & 0 deletions 测试/标识符包含关键字.圈2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
开始
使小使数为5
打印小使数
结束

0 comments on commit cf0b63c

Please sign in to comment.