|
From: Sven K. <s78...@in...> - 2007-09-12 09:04:29
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi!<br>
<br>
For me it would be intresting what kind of tool you want to be called
by your exec statement.<br>
<br>
I had allready something similar in mind - i wanted to allow the
invocation of the execution of complex composers in composition recipes
and additionally I wanted to establish the usage of the
Interpreterinterface as an alternative to the standard complex
composers, which would be very useful for very complex composers. But
for this we would need to clearly redefine the componentmodel.<br>
<br>
<blockquote>
<pre wrap="">>But, then it becomes interesting how one can extend the basiccl language
>into a specific composition language used for a specific DCS (dedicated
>composition system). For example, if I want a "callmytool" construct in
>the language in which I write composition operators for Modular Xcerpt,
>how do I extend the basiccl language into 'mybasiccl' so I only make
>modifications to this extension and not the core language (basiccl)?</pre>
</blockquote>
You would have to go the same way as with reuselanguages. Firstly you
create a new AS mybasiccl containing the abstract syntax of the exec
operator, then you define it as a minimalcl.CompositionStatement = ...
. Additionally you would have to somehow refer to basiccl to include
its features in the model of mybasiccl too (maby we need some import
statement in the AS language....). Im currently not sure how this could
be done, a simple redefinition might do it (for example try to include
"basiccl.Prune;" in the AS of mybasiccl).<br>
The concrete syntax would finally be defined like<br>
<br>
<blockquote>CONCRETESYNTAX mybc FOR mybasiccl EXTENDS bc<br>
<br>
minimalcl.CompositionProgram ::= "composition" "program"
statementList;<br>
minimalcl.ComposerDefinition ::= "define" "composer" construct "("
arguments ("," arguments)* ")" "{" statementList ("return"
returnFragment ";")? "}";<br>
<br>
ToolExcecution ::= "exec" "(" .....")" ";" ;<br>
<br>
</blockquote>
Now you should be able to use mybs instead of bc. (Maby something more
is needed to be programmed in the core...not sure)<br>
<br>
hopefully helped,<br>
Sven.<br>
<br>
PS: If you really think, the toolexecution is useful, you should
introduce it into bc ;).<br>
<br>
Jakob Henriksson schrieb:
<blockquote cite="mid...@st..."
type="cite">
<pre wrap="">Hi again,
It's not what it seems, I'm not talking to myself. Instead I talked to
Steffen offline who pointed me in the right direction. New interpreters
for the composition language can be added to
de.tudresden.reuseware.fracola and registered in the corresponding
plugin.xml file (but perhaps no-one should commit any drastic changes
without checking with the people involved first? Which I guess is Sven
now?) Anyway, I tried it on my local copy and it worked fine.
But, then it becomes interesting how one can extend the basiccl language
into a specific composition language used for a specific DCS (dedicated
composition system). For example, if I want a "callmytool" construct in
the language in which I write composition operators for Modular Xcerpt,
how do I extend the basiccl language into 'mybasiccl' so I only make
modifications to this extension and not the core language (basiccl)?
The search continues...
Jakob
On Tue, 11 Sep 2007 14:11:23 +0200, Jakob Henriksson
<a class="moz-txt-link-rfc2396E" href="mailto:jak...@tu..."><jak...@tu...></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi hackers,
For some experimental development I want to have the possibility to call
an external tool during execution of a composition operator, i.e, to
write something like this:
exec("path-to-tool", param_1, ..., param_n);
or perhaps even something more specific:
USEMYTOOL WITH PARAMS param_1, ..., param_n;
I can extend the composition language to allow such statements, but
where can I treat the parameters and implement the actions to take on
execution of such a statement?
Can someone point me in the direction, or describe how to create some
boiler-plate code that can later be augmented for the exact purpose of
the execution of those statements?
In short: I want a Java-method to interpret those statements, where does
the code go?
Thanks,
Jakob
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
<br>
</body>
</html>
|