Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/64.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C Debug Xtext甚至无法对决策错误执行k=1_C_Grammar_Antlr3_Xtext - Fatal编程技术网

C Debug Xtext甚至无法对决策错误执行k=1

C Debug Xtext甚至无法对决策错误执行k=1,c,grammar,antlr3,xtext,C,Grammar,Antlr3,Xtext,我正在尝试为我使用的脚本语言创建一个Xtext解析器。该语言非常接近ANSI-C 我首先将这个语法转换为Xtext,并删除不需要struct、typedef等的部分 然而,我遇到了一些问题,我不知道如何正确地调试它们并找到我的错误。 我收到 error(10): internal error: org.antlr.tool.Grammar.createLookaheadDFA(Grammar.java:1279): could not even do k=1 for decision 39; r

我正在尝试为我使用的脚本语言创建一个Xtext解析器。该语言非常接近ANSI-C

我首先将这个语法转换为Xtext,并删除不需要struct、typedef等的部分

然而,我遇到了一些问题,我不知道如何正确地调试它们并找到我的错误。 我收到

error(10): internal error: org.antlr.tool.Grammar.createLookaheadDFA(Grammar.java:1279): could not even do k=1 for decision 39; reason: timed out (>10000ms)
还有OutOfMemoryError异常

编辑:我已经尝试增加内存和超时。但是,即使使用较大的值,这也不起作用

有人能提出调试语法的方法吗?第39号决定在哪里?我很想找到问题所在,但什么也找不到


PS:我已经在这里发布了语法列表,为了不使发布混乱,您可以通过在workflow.mwe2中激活调试模式来生成Antlr语法。添加以下片段:

fragment = org.eclipse.xtext.generator.parser.antlr.DebugAntlrGeneratorFragment {}
然后,您可以使用 快速教程