Re: [Vala] Building upon Vala



Hi Vlad,

On Wed, 2008-05-14 at 00:25 +0300, Vlad Grecescu wrote:
What am I doing now is that I extend Vala.Parser, process the *.gtkaml
files myself then feed *.vala files in their place.
That is, text processing: given an XML, I am writing a text that
represents a Vala source.

Two things:
1. I saw that starting with 0.3.x, Vala got a shiny new recursive
descent parser (btw, excellent job!)
2. I noticed that vala is no longer a shared library

These two things concern me, in different ways, and I would like your
opinion about them

The first thing is that it would be nice to be able to re-use portions
of the parser. Instead of just exporting 
vala_parser_parse ()
vala_parser_parse_file ()
it would be nice if one could directly call:
vala_parser_parse_declaration ()
(just an example).

This would alow someone to create Vala (and eventually GObject) code
with other mechanisms and also parse snippets of Vala code.

Yes, this probable makes sense, however, it's not as simple as declaring
these methods as public, as they for example don't accept EOF in some
cases where a code snippet might end. We should probably also enhance
the scanner a bit to make it easier to handle code snippets.

The second issue is that ever since libvala is no longer a shared
library, I have to recompile gtkaml to match against it.
This, I think, would be an issue for any future editors equiped with
code-completion et cetera. A much cleaner way would be to re-use the
parsing part of a libvala-1.0.so/dll.
Tool support could depend on the first (parsing) issue too!

There has been no change about libvala. It's still built and installed
as shared library by default in Vala 0.3.2 and we don't intend to change
this.

Jürg




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