3 ms·
I am a lowly JS dev so forgive my ignorance but what exactly would it be parsed to? Assembly doesn’t have a concept of objects/hash tables, does it?
by peanut_worm 6y ago
I am a lowly JS dev so forgive my ignorance but what exactly would it be parsed to? Assembly doesn’t have a concept of objects/hash tables, does it?
- minitoar 6y agoThis particular parser is intended to be called from C.
- sircastor 6y agoMy only experience with the 6502 is writing ASM for the NES. So I had no concept for how this would work.
- nineteen999 6y agoYou could use the CC65 compiler to compile C to 6502 assembly, although, even C generally uses a (relatively) obscene amount of memory on an 8-bit system. https://www.cc65.org/ https://www.cc65.org/
- lifthrasiir 6y agoIts core, implemented in 6502 assembly, is a streaming parser and emits a series of events to signal the boundary of objects or arrays and atomic values. For example `[1, {"a": true}]` will emit something like `abegin; number 1; obegin; okey "a"; true; oend; aend; end`. There is a supplementary C library that parses this into a recursive structure (you will typically need to do the linear search for keys then).
- peanut_worm 6y agoOh okay that makes sense. Thank you for explaining.