The sable mechanism for abstract syntax trees is strong enough to do things 
like infix to postfix translation I am not sure that you could use it for more 
complex translations as it lacks a recursive function facility.

Paul

--- original message ---
From: "Robert Jakob" <[email protected]>
Subject: Re: Translation
Date: 16th September 2011
Time: 7:50:08 am


Hi,

isn't what your doing some sort of model transformation [1]?
I am not sure if this is the right direction to go
because I have only basic knowledge in this area.
But maybe it is worth a look.
(Especially, the French version of the wikipedia article
seems to be a lot more detailed)


Robert

[1] http://en.wikipedia.org/wiki/Model_transformation

Am Thu, 15 Sep 2011 22:11:42 +0200 (CEST)
schrieb Sebastián PENA SALDARRIAGA
<[email protected]>:

> Hi sablecc users,
>
> I was wondering if some of you have been involved in projects where we
> want to translate the language of your grammar into another, e.g.
> translating infix mathematical expressions into reverse polish
> notation. In such cases, I think that token by token or production by
> production transduction is not an option.
>
> What do you think it is a good approach to do so ? Can abstract syntax
> trees help [1] ?
>
> I'm actually trying to translate treebank [2] sentences into a flat
> structure, and the only way I see now is to manually inspect concret
> tree nodes and hard-code rules for each.
>
> Any ideas ?
>
> Cheers,
>
> Sebastian
>
> [1] http://nat.truemesh.com/archives/000531.html
> [2] http://en.wikipedia.org/wiki/Treebank
>
>
>
> _______________________________________________
> SableCC-Discussion mailing list
> [email protected]
> http://lists.sablecc.org/listinfo/sablecc-discussion


_______________________________________________
SableCC-Discussion mailing list
[email protected]
http://lists.sablecc.org/listinfo/sablecc-discussion

The University of Glasgow, charity number SC004401
_______________________________________________
SableCC-Discussion mailing list
[email protected]
http://lists.sablecc.org/listinfo/sablecc-discussion

Reply via email to