Probably not useful for anyone else, but I needed to parse objects in a LUA script for object loading & placement in #3dsMax so I bashed together a basic document tokenizer in #maxscript last night: https://gist.github.com/DevilboxGames/65d67b5c63cc84dd678d740a7ca887b1 #gamedev #modding
I needed to parse LUA in maxscript to access data for position loading and positioning objects in a scene, so I wrote a quick and dirty parser tokenizing parser. Pass in the file name when creating the Doc object, then call nextToken() to get the next token. It skips whitespace, handles basic strings (no escape sequences) and strips quotes around strings. Quick and dirty but does the job.
I needed to parse LUA in maxscript to access data for position loading and positioning objects in a scene, so I wrote a quick and dirty parser tokenizing parser. Pass in the file name when creating...