2017-07-03 52 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

你的錯誤消息的最後一行是很能說明問題。如果你看語法,每個單詞都是大寫的。這意味着這只是詞法分析規則,而那些有錯誤的規則。解析器規則完全不存在。也許在投入時間之前先聯繫這個語法的海報或者搜索解析器規則。