octave-maintainers
[Top][All Lists]
Advanced

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

Re: new OOP syntax


From: Robert T. Short
Subject: Re: new OOP syntax
Date: Tue, 16 Nov 2010 08:27:46 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4) Gecko/20091017 SeaMonkey/2.0

Ben Abbott wrote:
I've recently come across two m-files that require the new OOP syntax to run.

They are matlab2tikz and matlab2pgfplots.

        http://win.ua.ac.be/~nschloe/content/matlab2tikz

        
http://www.ctan.org/tex-archive/graphics/pgf/contrib/pgfplots/scripts/pgfplots/

A introduction to the new syntax is below.

        http://www.advancedmcode.org/object-oriented-programming-in-matlab.html

If there are no objections, 'd like to enter a ticket in the bug tracker.

Ben



I would love to see classdef support and keep thinking I will do this. I simply have not had time and the parser scares me anyway. Months ago Ryan Rusaw posted a patch to begin the effort. I am reposting that now along with his comments.

Attached is a first stab at adding the basis for classdef files to the
lexer&  the parser. With it the parser should be able to correctly
parse classdef files, although it currently doesn't do anything more
with them, as a number of items are still necessary to complete a
serviceable implementation:

1. +package directory support.
2. classdef support added to pt-* hierarchy.
3. octave_value subclass for classdef objects.
4. integrate with metaclass code, either the code Michael Goffioul
provided previously on the mailing list or something similar.
5. add support for class events.
6. add support for the automatic resolution of class property get&  set methods.

Note: I used the Matlab documentation available at
http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/matlab_oop/ug_intropage.html
as the basis for the changes, so it should be as close to complete as
the documentation allowed. If anyone finds something I've missed or
overlooked, please let me know.

Ryan

Attachment: CLASSDEF_PARSER.diff
Description: Text Data


reply via email to

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