2017-07-03 53 views
0

我发现下面的Antlr 4语法:ANTLR的V4文法的XQuery 3.1

error(134): xquery31.g4:178:26: rule reference PragmaContentsInternal is not currently supported in a set 
error(134): xquery31.g4:264:25: rule reference DirPIContentsInternal is not currently supported in a set 
error(134): xquery31.g4:268:32: rule reference CDataSectionContentsInternal is not currently supported in a set 
error(134): xquery31.g4:311:17: rule reference StringConstructorCharsInternal is not currently supported in a set 
warning(156): xquery31.g4:377:59: invalid escape sequence 
warning(156): xquery31.g4:378:60: invalid escape sequence 
warning(156): xquery31.g4:392:30: invalid escape sequence 
warning(156): xquery31.g4:394:30: invalid escape sequence 
error(134): xquery31.g4:416:27: rule reference CommentContentsInternal is not currently supported in a set 
warning(146): xquery31.g4:13:0: non-fragment lexer rule Prolog can match the empty string 
warning(146): xquery31.g4:110:0: non-fragment lexer rule WindowVars can match the empty string 
warning(146): xquery31.g4:127:0: non-fragment lexer rule OrderModifier can match the empty string 
warning(146): xquery31.g4:211:0: non-fragment lexer rule PredicateList can match the empty string 
warning(146): xquery31.g4:248:0: non-fragment lexer rule DirAttributeList can match the empty string 
warning(146): xquery31.g4:261:0: non-fragment lexer rule DirCommentContents can match the empty string 
error(99): xquery31.g4::: grammar xquery31 has no rules 

是否有:

https://gist.github.com/JoeyAcc/829c28fcf18091ed6ebfcf91d7519f58

我试图从其生成代码收到以下错误解决这个ANTLR V4语法的建议?

EBNF for XQuery v3.1在这里

回答

0

你的错误消息的最后一行是很能说明问题。如果你看语法,每个单词都是大写的。这意味着这只是词法分析规则,而那些有错误的规则。解析器规则完全不存在。也许在投入时间之前先联系这个语法的海报或者搜索解析器规则。