Jump to content

Indirect recursion only working with a breakpoint inserted


Recommended Posts

Maybe someone can find what I'm doing incorrectly...

I'm doing a fairly literal port of json_parse.js from Douglas Crockford. It's an indirect recursive descent parser that uses a global to track where it's at in the JSON string that it's parsing. Essentially, value() calls object(). object() may then call value(), and so on. Works great... as long as my value.vi has a breakpoint inserted at the beginning. Take the breakpoint out, and the vi doesn't... really seem to execute. Or it does, but unpredictably.

Does anyone have any insight into what might be going on here? The code was crashing with an access violation. I spoke with an AE, and he said my top level VI was corrupted. Replacing the LV native globals with an LV2 global fixed the crash, but hasn't fixed the execution issue.

Code's attached, if anyone has any insight. Parse.vi is the top level. (Sorry, haven't had a chance to implement array() yet...)

Thanks,

Joe Z.

json indirect recursion.zip

Edited by jzoller
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.