About token sets

38 views
Skip to first unread message

vince

unread,
Jan 9, 2012, 3:02:48 AM1/9/12
to sarasvati-wf-users
Hello,

First of all happy new year to everyone!

I have a few question about the token sets - I haven't used them or
tested them yet, but I'll need to ASAP...
So here are my questions:

1° In the BaseEngine.completeWithNewTokenSet() method, shouldn't there
be a call to executeQueuedArcTokens? As I understand it, n arc tokens
are created, but then it seems that the execution will be indefinitely
'on hold' - or maybe I missed something ?

2° Shouldn't there be events fired when a set and set members are
created (the same way there are events when arc/node tokens are
created)?

3° I can't seem to have a working workspace in Eclipse. An important
thing is that the 'fetchlibs' target points to a non-existing path ($
{version} is set to 1.0.5, but there's no such directory on the SVN
repo). It's easily fixed by replacing the version to 1.0.4 though. But
even after fixing that, it looks like some classes are missing:
*
JoinLangLexer
* RubricParser
* RubricLexer

vince

unread,
Jan 9, 2012, 3:05:29 AM1/9/12
to sarasvati-wf-users
Sorry, I pressed some shortcut key before the message was finished :-\

Missing classes are:

* JoinLangParser
* JoinLangLexer
* RubricParser
* RubricLexer

Do I miss something?

Thanks,
Vincent

Paul Lorenz

unread,
Jan 9, 2012, 10:13:14 AM1/9/12
to sarasvati...@googlegroups.com
Happy New Year :)

Responses in-line:

On Mon, Jan 9, 2012 at 3:05 AM, vince <vincent...@gmail.com> wrote:
> Sorry, I pressed some shortcut key before the message was finished :-\
>
> Missing classes are:
>
> * JoinLangParser
> * JoinLangLexer
> * RubricParser
> * RubricLexer
>
> Do I miss something?
>
> Thanks,
> Vincent
> On Jan 9, 9:02 am, vince <vincent.kir...@gmail.com> wrote:
>> Hello,
>>
>> First of all happy new year to everyone!
>>
>> I have a few question about the token sets - I haven't used them or
>> tested them yet, but I'll need to ASAP...
>> So here are my questions:
>>
>> 1° In the BaseEngine.completeWithNewTokenSet() method, shouldn't there
>> be a call to executeQueuedArcTokens? As I understand it, n arc tokens
>> are created, but then it seems that the execution will be indefinitely
>> 'on hold' - or maybe I missed something ?
>>

I should have called the method completeWithNewTokenSetAsync. I don't
remember why I didn't, maybe I didn't because the name was so long? I
don't want to change the behavior of that method, for backwards
compatibility reasons.

Maybe the best thing to do is to add two new methods, completeFoo and
completeFooAsync, and deprecate completeWithNewTokenSetAsync. Any
suggestions as to names? completeWithTokenSet?
completeCreatingTokenSet? completeAndStartTokenSet?

But yes, just like completeAsync, you need to call
executeQueuedArcTokens at some point for anything to happen.

>> 2° Shouldn't there be events fired when a set and set members are
>> created (the same way there are events when arc/node tokens are
>> created)?
>>

Yes, probably. Should add that for completeness.

>> 3° I can't seem to have a working workspace in Eclipse. An important
>> thing is that the 'fetchlibs' target points to a non-existing path ($
>> {version} is set to 1.0.5, but there's no such directory on the SVN
>> repo). It's easily fixed by replacing the version to 1.0.4 though. But
>> even after fixing that, it looks like some classes are missing:
>>  *
>> JoinLangLexer
>>  * RubricParser
>>  * RubricLexer
>

Are you running from SVN trunk? Or from the 1.0.4 release?

Cheers,
Paul


> --
> You received this message because you are subscribed to the Google Groups "sarasvati-wf-users" group.
> To post to this group, send email to sarasvati...@googlegroups.com.
> To unsubscribe from this group, send email to sarasvati-wf-us...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/sarasvati-wf-users?hl=en.
>

vince

unread,
Jan 10, 2012, 3:20:23 AM1/10/12
to sarasvati-wf-users
Hello Paul,

Thanks for you ever quick replies.

1° It's fine by me if I have to call executeQueuedArcTokens by hand, I
just wanted to make sure it was not something missing. However I think
it's a nice idea to have a method that does it automatically too, if
anything, it'll be more consistent with the normal (as in "non-token
set") behaviour.

As for the name, completeWithTokenSet and completeWithTokenSetAsync
seem fine and consistent with complete/completeAsync, don't you think?

2° Cool then :)

3° I took the trunk SVN. I had a few issues with antlr3 (all on my
side) but it seems that the build.xml is broken regarding paths. I had
to change the path to Rubric.g and JoinLang.g, and then the output
directory seems to be a problem too. I didn't go further as I had to
switch to something else for work. Or maybe there's a secret ninja
parameter to use somewhere?

Cheers
Vincent
> > You received this message because you are subscribed to the Google Groups "sarasvati-wf-users" group.> To post to this group, send email tosarasvat...@googlegroups.com.> To unsubscribe from this group, send email tosarasvati-wf-u...@googlegroups.com.

Paul Lorenz

unread,
Jan 10, 2012, 6:15:43 PM1/10/12
to sarasvati...@googlegroups.com
On Tue, Jan 10, 2012 at 3:20 AM, vince <vincent...@gmail.com> wrote:
> Hello Paul,
>
> Thanks for you ever quick replies.
>
> 1° It's fine by me if I have to call executeQueuedArcTokens by hand, I
> just wanted to make sure it was not something missing. However I think
> it's a nice idea to have a method that does it automatically too, if
> anything, it'll be more consistent with the normal (as in "non-token
> set") behaviour.
>

I went to go update this, and realized I had forgotten that there's an
asynchronous flag that gets passed in, which controls the behavior. I
still might add the new methods, though, for consistency with the
existing complete.. methods.

> As for the name, completeWithTokenSet and completeWithTokenSetAsync
> seem fine and consistent with complete/completeAsync, don't you think?
>
> 2° Cool then :)
>
> 3° I took the trunk SVN. I had a few issues with antlr3 (all on my
> side) but it seems that the build.xml is broken regarding paths. I had
> to change the path to Rubric.g and JoinLang.g, and then the output
> directory seems to be a problem too. I didn't go further as I had to
> switch to something else for work. Or maybe there's a secret ninja
> parameter to use somewhere?
>

Trunk is currently undergoing a move to maven. I'm not a big fan of
maven, but I decided to make friends with it. It should all work in
eclipse, but you'll need to either use m2e or run mvn eclipse:eclipse
to get the eclipse set up properly. The parser/lexer java files should
get generated under target/generated-resources/antlr3, and be
automatically in your classpath.

Let me know if you run into any maven problems.

Cheers,
Paul

> To post to this group, send email to sarasvati...@googlegroups.com.
> To unsubscribe from this group, send email to sarasvati-wf-us...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages