, , .
:
ax + ay - 0x01;
^
^
^
^
^-^
[_________]- Comments (ignored)
, :
identifier("ax");
operator("+");
identifier("ay");
operator("-");
const((int)0x01);
separator();
:
ax + ay - 0x01;
^
^
^
^
^-^
[_________]
:
identifier("a");
identifier("x");
operator("+");
identifier("ay");
operator("-");
const((int)0x01);
separator();
, .
, , , .
In fact, I recently just read an article about writing a simple JavaScript interpreter. It helped me with this answer. http://www.codeproject.com/Articles/345888/How-to-write-a-simple-interpreter-in-JavaScript
source
share