octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #29476] Parser incompatibility for keywords ag


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #29476] Parser incompatibility for keywords against Matlab implementation, infinite loop
Date: Fri, 09 Apr 2010 20:16:35 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100308 Iceweasel/3.5.8 (like Firefox/3.5.8)

Follow-up Comment #8, bug #29476 (project octave):

I suppose we could also modify the is_keyword_token function to not treat
Octave's extra keywords as special in certain cases.  If we do this, then I
think even with --traditional we should accept the additional keywords if we
are parsing an Octave function.  The difficulty is in deciding when we are
parsing an Octave function.  I would guess at least all files that are in
Octave's "system" path, but which others?  Octave Forge package files (all or
just some)?  Files that, when we look at them (not taking into account the
additional keywords, of course) could obviously not be parsed by Matlab.  I
guess that would include any file that had comments starting with #, for
example.  But would that only count if the # token appeared before seeing any
of the additional keywords?  Or should there be some other way of marking a
file (say in a comment) as an "Octave" or "Matlab" file?  Would it be
sufficient to have one conditional ("strict Matlab syntax rules" vs. "normal
Octave syntax rules") or should it be possible to enable individual features
selectively?  Or is this all just too complicated?  

If is_keyword_token is changed, some corresponding change would also need to
be made to the is_keyword function in src/lex.ll.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?29476>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]