Re: [CEDET-devel] need help with python parser error messages
Brought to you by:
zappo
From: David P. <dav...@wa...> - 2003-01-25 08:59:03
|
Hi Richard, > I noticed the following lines in my *Messages* buffer: > > Grammar in wisent-python.el contains 1 useless nonterminals and 1 useless rules > Grammar in wisent-python.el contains 2 shift/reduce conflicts The first message indicates unused rules that can probably be safely removed from the grammar. The second message indicates that certain states of the automaton result in two different actions (shift or reduce, reduce or reduce) that conflict. Normally an LALR automaton must be fully deterministic (1 state -> 1 action). I encourage you to read the bison's manual to learn more on LALR parsers. In most case shift/reduce conflicts are not errors and can be safely ignored. It is probably the case for the python grammar :-) You can do M-: (set wisent-verbose-flag t) before compiling your grammar to get detailed informations on these issues in a "*wisent-log*" buffer. wisent.info should explain the content of that buffer (see chapter "Grammar/Compiling a grammar/Conflicts", then menu item "Grammar Debugging"). > *** `<no-type>' default matching spec DEDENT redefined as INDENT > *** `symbol' default matching spec INDENT redefined as NAME > *** `number' default matching spec NAME redefined as NUMBER_LITERAL > *** `string' default matching spec NUMBER_LITERAL redefined as STRING_LITERAL > *** `newline' default matching spec STRING_LITERAL redefined as NEWLINE The above messages are warnings issued when building the table of terminal tokens (from %token declarations). You can safely ignore them. I will have a look at the code that builds the token table to see if I can improve these obscure messages! Hope it helps! Thanks. David |