[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #56809] Dots in script file names should be al
From: |
Michael Leitner |
Subject: |
[Octave-bug-tracker] [bug #56809] Dots in script file names should be allowed |
Date: |
Thu, 29 Aug 2019 16:43:46 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:47.0) Gecko/20100101 Firefox/47.0 |
Follow-up Comment #3, bug #56809 (project octave):
No, I wouldn't touch parsing. I see that it won't be possible to have
arithmetic operators, dots and the like in function names, but script names
don't need to be parsed. What I am proposing is that only if parsing errors
out or if it finds that some tokens it has identified as operands are
undefined, it is tried whether the _whole command string_ is an existing
script file name. Thus, if it should happen that if you have a struct "script"
defined that has a field "a", you wouldn't be able to call the script
"script.a.m" by issuing the command "script.a", but in all other cases you
would. You would even be able to name a script "a=b.m" and call it the normal
way as long as b does not exist (I don't claim that this would be a good
idea).
By the way, I have just found out that the interpreter (I don't know if this
is the correct concept, what I mean is the stage of octave that takes the
tokens returned by the parser and evaluates them) does have some notion of
scripts: when you have script.m, calling
script(1)
returns "invalid use of script /tmp/script.m in index expression", while
script+1
returns "invalid call to script /tmp/script.m". I would have expected
"'script' undefined near line ...", which is returned if script.m does not
exist. Is there a reason for that? Can script names (that is, not as a string
object delimited by quotes) in any sense be part of a regular command apart
from making up the whole of the command? Couldn't thus the process be actually
simplified by not having to check tokens against string names, and only if a
parsing error occurs or some token is undefined, try to read the _whole
command_ as script name?
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?56809>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #56809] Dots in script file names, Michael Leitner, 2019/08/26
- [Octave-bug-tracker] [bug #56809] Dots in script file names should be allowed, Rik, 2019/08/29
- [Octave-bug-tracker] [bug #56809] Dots in script file names should be allowed, Mike Miller, 2019/08/29
- [Octave-bug-tracker] [bug #56809] Dots in script file names should be allowed,
Michael Leitner <=
- [Octave-bug-tracker] [bug #56809] Dots in script file names should be allowed, Mike Miller, 2019/08/29
- [Octave-bug-tracker] [bug #56809] Dots in script file names should be allowed, Michael Leitner, 2019/08/30
- [Octave-bug-tracker] [bug #56809] Dots in script file names should be allowed, John W. Eaton, 2019/08/30
- [Octave-bug-tracker] [bug #56809] Dots in script file names should be allowed, Michael Leitner, 2019/08/30
- [Octave-bug-tracker] [bug #56809] Dots in script file names should be allowed, Mike Miller, 2019/08/30