提交 c384916e authored 作者: Thomas Mueller's avatar Thomas Mueller

Fix BNF for procedures

上级 a74a8591
...@@ -2140,13 +2140,13 @@ value ...@@ -2140,13 +2140,13 @@ value
| ?[ int ] | ?[ int ]
| NEXT VALUE FOR sequenceName | NEXT VALUE FOR sequenceName
| function | function
| procedure
| { - | + } term | { - | + } term
| ( expression ) | ( expression )
| select | select
| case | case
| caseWhen | caseWhen
| tableAlias.columnName | tableAlias.columnName
| userDefinedFunctionName
"," ","
A value. Parameters can be indexed, for example ""?1"" meaning the first parameter. A value. Parameters can be indexed, for example ""?1"" meaning the first parameter.
Each table has a pseudo-column named ""_ROWID_"" that contains the unique row identifier. Each table has a pseudo-column named ""_ROWID_"" that contains the unique row identifier.
......
...@@ -711,13 +711,13 @@ value ...@@ -711,13 +711,13 @@ value
| ?[ int ] | ?[ int ]
| NEXT VALUE FOR sequenceName | NEXT VALUE FOR sequenceName
| function | function
| procedure
| { - | + } term | { - | + } term
| ( expression ) | ( expression )
| select | select
| case | case
| caseWhen | caseWhen
| tableAlias.columnName | tableAlias.columnName
| userDefinedFunctionName
"," ","
A value." A value."
"Other Grammar","Time"," "Other Grammar","Time","
......
...@@ -136,7 +136,7 @@ public class TestBnf extends TestBase { ...@@ -136,7 +136,7 @@ public class TestBnf extends TestBase {
DbContextRule columnRule = new DbContextRule columnRule = new
DbContextRule(dbContents, DbContextRule.COLUMN); DbContextRule(dbContents, DbContextRule.COLUMN);
bnf.updateTopic("column_name", columnRule); bnf.updateTopic("column_name", columnRule);
bnf.updateTopic("procedure", new bnf.updateTopic("user_defined_function_name", new
DbContextRule(dbContents, DbContextRule.PROCEDURE)); DbContextRule(dbContents, DbContextRule.PROCEDURE));
bnf.linkStatements(); bnf.linkStatements();
// Test partial // Test partial
...@@ -145,7 +145,7 @@ public class TestBnf extends TestBase { ...@@ -145,7 +145,7 @@ public class TestBnf extends TestBase {
assertTrue(tokens.values().contains("INT")); assertTrue(tokens.values().contains("INT"));
// Test identifiers are working // Test identifiers are working
tokens = bnf.getNextTokenList("create table \"test\" as s" + " el"); tokens = bnf.getNextTokenList("create table \"test\" as s" + "el");
assertTrue(tokens.values().contains("E" + "CT")); assertTrue(tokens.values().contains("E" + "CT"));
tokens = bnf.getNextTokenList("create table test as s" + "el"); tokens = bnf.getNextTokenList("create table test as s" + "el");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论