Esclavo JSON
objeto :- write('{'),cadena,write(':'),valor,extra.
valor :- read(X),(X='cadena'->cadena;X='numero'->numero;X='objeto'->objeto, X='vacio').
numero :- read(X), write(X).
cadena :- read(X),write('"'),write(X),write('"').
extra :- read(X), (X='extra' -> ingresar; X='fin'->fin).
ingresar :- write(','),cadena,write(':'),valor,extra.
fin :- write('}').
vacio :- write('').
:- objeto.
|
run
| edit
| history
| help
|
0
|
|
|