[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #37099] Parser does not accept bare '; ' as va
From: |
Stefan Mahr |
Subject: |
[Octave-bug-tracker] [bug #37099] Parser does not accept bare '; ' as valid input |
Date: |
Thu, 22 Aug 2013 09:30:17 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/28.0.1500.71 Chrome/28.0.1500.71 Safari/537.36 |
Follow-up Comment #10, bug #37099 (project octave):
My patch doesn't change this behaviour. Also, MATLAB seems to do the same:
??? [1,,2]
|
Error: Expression or statement is incorrect--possibly unbalanced (, {, or [.
Surprisingly my patch also doesn't introduce new parser conflicts. (I learned
from jwe, that I should check oct-parse.output before submitting a parser
patch.)
However, jwe said he don't want to add an additional 'input2' statement. My
first try was to modify the 'input' statement as follows:
input : opt_sep_no_nl input1
{
parser.stmt_list = $2;
YYACCEPT;
}
but this doesn't work for some reason. It produces many parser conflicts and
you always have to write ';' or ',' in front of the first statement. Maybe
someone could explain what's the difference between my patch and the lines
above...
I just should keep my hands off the parser. :-)
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?37099>
_______________________________________________
Nachricht gesendet von/durch Savannah
http://savannah.gnu.org/