Показаны сообщения с ярлыком octclipse. Показать все сообщения
Показаны сообщения с ярлыком octclipse. Показать все сообщения

пятница, 10 февраля 2012 г.

Initial state of the project

First, I want to describe current situation with Octclipse project. To be honest, this project is a really good job! There are a lot of features and I still don't understand everything.

Octclipse is based on Eclipse DLTK (Dynamic Language ToolKit) project. It already has two source parsers, syntax highlighting, launching support, initial debug support, integrated Octave help and many other features.

What is wrong now?

1. Parsers.
One parser is Java-based, implemented with BYACC/J and JFlex. That means, its' grammar was implemented manually and that's why was not complete. Octclipse grammar file size is 3 times smaller than original Octave grammar. So, there are a lot of small issues with parsing (but in general it works on simple sources)

Example of parsing issue:
if  (2 > 1),
  x = 1:10;
  x(end-2:end)
end;

This code is correct and can be executed in Octave without any problems.

The problem relates to 'end' keyword. This special case of using 'end' in vectors to point to the last element was just forgotten (or it was difficult to implement this case).

Second parser is a native one. The main idea is to use native octave parser to determine tokens semantic. That is reasonable, because if something works in Octave, it should work in Octclipse. The problem is that now this parser doesn't work at all due to some changes in AST (Abstract Syntax Tree) classes. Beside, its' architecture is very sophisticated now:

  • User must compile and install native library himself
  • Native library parses source file and converts it to XML
  • In Java-side, ANTXR-based parser converts XML to AST


2. Debug
I didn't manage to run debug yet, because it also requires compiling a native library.

There are also two more native libraries, but I didn't understand their goal yet.

Octclipse reincarnation

Once I decided to start working with Octave and looked for available graphical user interfaces for it.

Sadly, all projects I've found are dead. Even the most usable one - QtOctave was finished in June 2011. So, I decided to make my contribution to Open-Source World and to pick up some of those projects.

I already had some expirience with Eclipse plugins development, so my choice was to contribute Octclipse project. Besides, I think, Eclipse is the most powerful platform for building IDEs.

I wrote an email to Ryan Rusaw, author of this project and he gave me administrative rights for project on sourceforge and permissions to do everything what I want to improve the project.

Ok, I will try to do all my best. My first goal to make it runnable without any native code compilation (as it is now) and make it usable at least as QtOctave is.

And I will write here about state-of-art, some important changes, design solutions and so forth.