开发者

Exception: "Invalid action number found in internal parse table." Polyglot Exception

I am using an Compiler called Polyglot which is a highly extendable compiler for Java.

I seem to have run into this Exception while trying to compile some test code:

 "Invalid action number found in internal parse table." 

How can I make a valid action number for the parse table?

EDIT:

I solved the problem by just fixing my grammar a bit... I had an issue with calling methods without types. (It is late I'm sorr开发者_运维百科y) Now I am more curious to when the Exception above is thrown? And what is an action number?


A parsing table is a table describing what action its parser should take when a given input comes while it is in a given state. In each step, the parsing table is consulted to decide what action to take. The parsing table consists of two parts, the action table and the goto table. The action table takes the state at the top of the stack and the next symbol in the input buffer (called the "lookahead" symbol) and returns the action to take, and the next state to push onto the stack. Parsing table

So I assume that the action number, is a number that represents a specific action the Parsing table can take.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜