Semantic-debug will show you stepping over the various rules, but if
the last spot where you hit SPACE is a missmatch, then the entire
parsing stack unwinds, and that first token is considered
unparseable. The parser then moves to the next token hoping it will
get a match.
I thought the debugger printed out status, but it does not.
You should start w/ semantic-lex-debug, or semantic-lex-test-region to
get the lexical tokens being provided. Knowing what they are will
help you identify if a given highlighted frame in semantic-debug is a
match or a fail. I'm guessing the last rule you hit SPC on is a
failed match, but the debugger isn't indicating that.
>>> Jesse Alama <alama@...> seems to think that:
>It turns out that my initial assessment of what's going on with
>`semantic-debug' was mistaken. I had assumed that, once I stepped
>through my test file using semantic-debug and seeing that the
>productions that I intended to be followed were in fact followed,
>everything was OK in the sense that the file is now parsed correctly.
>But there's more to it than that. Surprisingly, after reaching the
>end of my file, hitting SPACE in the semantic-debug interface brings
>me back to my initial starting rule, but, according to the green
>highlighted text, parsing is starting at the *second* token, not the
>first token! It seems that once an initial parse was "successful", it
>starts over again at the second token. Naturally, starting with the
>initial rule at the second token results in an unparseable token
>stream. At the end of this "second round" of parsing, semantic-debug
>stops and every token is flagged with a red underline. I'm pretty
>sure that my grammar is OK, that is, I'm pretty sure that my grammar
>doesn't admit of this kind of unintended sequence of productions.
>What might be going on?
>"Eric M. Ludlam" <eric@...> writes:
>> A good way to figure out what's wrong w/ an infinite loop is to use:
>> M-x toggle-debug-on-quit RET
>> and then hit C-g once it gets wedged. Otherwise I can't really
>> predict what might be wrong.
>> Good Luck
>>>>> Jesse Alama <alama@...> seems to think that:
>>>I'm writing a bovine grammar for a new language and am testing it out
>>>on a simple example. After some initial difficulty, I managed to get
>>>a correct parse of my simple example file in the sense that when I run
>>>`semantic-debug', I can interactively step through the parse, and I
>>>reach the end (the entire file is parsed correctly). Nonetheless,
>>>what puzzles me is that calling `bovinate' results in what seems to be
>>>an infinite loop. (If I don't hit C-g relatively soon after calling
>>>`bovinate', my entire emacs process is consumed and must be killed.)
>>>What might be going on? I'm puzzled as to why I can get a successful
>>>parse in the sense that I can step through a successful parse using
>>>`semantic-debug', but `bovinate' doesn't terminate.
>>>Thank for your help,