Reto: p9-t4-peg-infix2egg
Reto: p9-t4-peg-infix2egg
Añada objetos y la notación .
a su lenguaje de infijo. Algo similar
a esto:
begin
let x = {
c: 0,
gc: function() { c },
sc: function(value) { c = value},
inc: function{ c = c+1 }
};
print(x.c); // 0
print(x.gc()); // 0
print(x.sc(5)); // 5
print(x.gc()) // 5
end
Recursos
PEGs
- Un ejemplo breve de como hacer esta práctica: pegjs-infix-2-egg
- PEGs Viejos apuntes del profesor
- PEG.js PEG.js Documentation
Egg
- El lenguaje egg: repo en GitHub
- Eloquent JS: Chapter 11. Project: A Programming Language
- Repo interpreter-egg
- NodeJS Readline gist
PDR
Testing
Jison
- Jison Documentation
- Folder jison/examples from the Jison distribution
- Repo ULL-ESIT-PL-1718/jison-aSb
- Repo ULL-ESIT-PL-1718/ull-etsii-grado-pl-jisoncalc