On Wed, Apr 19, 2023 at 04:56:00PM +0200, Arsen Arsenović wrote: > Reduced test case: > > @table @asis > @item @end table > > This seems to happen only on the 7.0 branch (i.e. master is fine). > > To my untrained-to-the-parser eyes, it seems like the parser is trying > to parse @end as part of @item and getting confused (whereas the > unaffected version parses @item first, with no argument, and then @end).
I haven't investigated the release/7.0 branch, but confirmed that a regular error message is printed with master: test.texi:6: warning: @item missing argument The message "You found a bug" does indeed indicate a bug. In the original input file (cc65.texi), the failing input is around line 1086: @w{ } @item !@*.NOT @item Boolean not @item 7 @item @end table @* @center Available operators, sorted by precedence Would getting rid of the final @item allow success processing of this input file with texi2any 7.0.3? There were changes on the master branch to handle checking of valid nesting, which included handling of closing contexts, so it is possible that one of those changes was responsible for fixing the bug. (As texi2any goes on through parsing a file, it uses various stacks of contexts, which are then popped as it moves out of certain regions of input. If these contexts are not removed when they should be, the file may be parsed incorrectly, or incorrect error messages may be given.) In this @item @end table the "line" context starts after the "@item" command is read, indicating that the input is now the argument to a line command. My guess is that this context is never removed due to the invalid input. > I'll try to bisect and come up with a fix. Everyone should feel free to > beat me to it, though. Thanks. Given that it does not occur on the master branch and only occurs with invalid input, as far as we know, then it is not urgent, but if there was a fix it could potentially be added to the release branch or used by distributors.