Convert the near incomprehensible language of Esperanto to the other near incomprehensible language of JavaScript
- GNU Lex
>> flex
- GNU Bison
>> bison
- Yacc
Source | Output |
---|---|
LASU |
let |
SE |
if |
ALIE |
else |
DUM |
while |
POR |
for |
PRESI |
console.log |
FUNKCIO |
function |
REVENI |
return |
NE |
! |
-*- |
// (Comment) |
#!/bin/bash
flex translator.l
bison -d translator.y
gcc lex.yy.c translator.tab.c -o translator -lfl
./translator test.epo > output.js
#powershell
flex translator.l
bison -d translator.y
gcc lex.yy.c translator.tab.c -o translator -lfl
.\translator.exe test.epo > output.js