Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How do the switching happen? You just allow a node in one language to be some root of another, or is it more complicated?


The structure is defined using the begin and stack data fields of a given token. The begin points to the index of the current token's parent and the stack describes the structure contained by that parent. Items in the global space have no parent, so I assign a begin value of -1 and stack value of global. I use -1 because there is no such index in an array.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: