[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #35535] Index-expression parsing issue
From: |
Vladimir |
Subject: |
[Octave-bug-tracker] [bug #35535] Index-expression parsing issue |
Date: |
Wed, 15 Feb 2012 13:44:56 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.7 (KHTML, like Gecko) Ubuntu/11.10 Chromium/16.0.912.77 Chrome/16.0.912.77 Safari/535.7 |
URL:
<http://savannah.gnu.org/bugs/?35535>
Summary: Index-expression parsing issue
Project: GNU Octave
Submitted by: enargit
Submitted on: Срд 15 Фев 2012 13:44:55
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 3.4.3
Operating System: GNU/Linux
_______________________________________________________
Details:
Hello!
I am working on Octclipse project (Eclipse-based GUI for Octave). Now my goal
is to reuse octave parser. The idea is to have native C++ code to XML and then
use those XML in Java.
My code is based on Octave's tree_print_code class (pt-pr-code.h /
pt-pr-code.cc) and is very similar. But I encountered a bug in
tree_print_code.
Consider the following code:
x(1).a = "string1";
x(2).a = "string2";
x(1).q = 1;
x(2).q = 2;
q='a';
x.q
x.(q)
It runs in octave as expected. However, when I try to process it with
tree_print_code, I get the following output:
x (1).a = "string1";
x (2).a = "string2";
x (1).q = 1;
x (2).q = 2;
q = 'a';
x.q
x.
So, argument for dot operation (last line) is lost.
My testing code looks like
std::string fname = octave_canonicalize_file_name (file_ops::tilde_expand (
args (0).string_value ()));
tree_print_code print_code (std::cout);
octave_function *fcn = load_fcn_from_file (fname, "", "", "", true);
if (fcn)
{
fcn->accept (print_code);
}
I tried to debug this on myself, but did not manage to find lost argument
"(q)" in parsed octave_function object at all.
Could you fix this issue or suggest a workaround?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?35535>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #35535] Index-expression parsing issue,
Vladimir <=