[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: What would you recommend as best way to translate Lua to Esperanto
- From: Mathieu Stumpf Guntz <psychoslave@...>
- Date: Sun, 19 Jun 2016 10:57:08 +0200
Hi,
So I began my translation of Lua to Esperanto, you can find the project
there :
https://github.com/psychoslave/lupa
https://framagit.org/psychoslave/lupa
I already translated some tokens in llex.c as suggested in the thread I
was pointed to in the answer bellow.
Now, I run into some problems whose solution would be surely be more
easily found with some help by people who already know the Lua code base.
# Information about tokens
First, it looks like not all tokens defined in luaX_tokens are really
used in the parsing. For example I wanted to translate "==" with
"egalas"[1][2]. But replacing the token in luaX_tokens won't do the job :
lupa> se vera == vera tiam print('ververa') hop
ververa
lupa> se vera egalas vera tiam print('ververa') hop
stdin:1: 'tiam' expected near 'egalas'
Any hint on what should I do?
There are other tokens which may have no usage in Lua itself, as far as
I understand, namely :
"//", "<<", ">>", "<eof>", "<number>", "<integer>", "<name>",
"<string>"
I guess that "<word>" are just placeholders for corresponding word
classes (internal stuff). What about the three other they reserved words
with some use in Lua external itself?
# utf8
it's seems that I can't use unicode characters. For example :
lupa> cikle print('senfina') ĝis falsa
stdin:1: unexpected symbol near '<\196>'
Now Esperanto permit to use the -x- notation to bypass this kind of
problem, you can write "gxis" instead of "ĝis", but having the unicode
notation would be better. What should I do for that?
# Notes
[1] "egalas" meaning "equals" of course. That's not completely
satisfying to my mind, as it's a transitive verb which normally requires
an accusative complement (ie. "nuno egalas etalon"). One way to bypass
this is to use the -iĝ- affix which makes a transitive verb
intransitive. Thus "nuno egaliĝas etalo" is a grammatically Esperanto
congruent sentence meaning "actual thing and standard are equals".
[2] Yes, the project goals include replacing all non-phonetic symbols
from the language itself.
Le 07/12/2015 à 18:55, Luiz Henrique de Figueiredo a écrit :
>> While wrapping standards libs with corresponding translation
>> shouldn't come with any technical difficulty, I would be interested
>> to know if anyone would have a better or more elegant solution.
>> Also, I'm not a Lua expert but it doesn't look like the language
>> provide any standard mechanism to rename/alias keywords. I would
>> warmly welcome any advice on this point.
> See http://lua-users.org/lists/lua-l/2015-09/msg00157.html and that
> while thread.
>