0

I have an automatically generated TCL proc, which has many if condition, some lines inside some if condition never gets executed for any possible combinations of proc inputs.

But I found some syntactical errors in those lines like extra ] or multiplication [1*1] instead of [expr 1*1]. I want to find out these TCL syntactical errors in all the lines. Is there any clever way to do achieve this?

3
  • Identify the error "classes" / "categories" then fix the generator that created the TCL proc. Commented Oct 13, 2017 at 8:58
  • this is not what I'm asking, I have no control over the generator, tell me any solution assuming proc is generated. Commented Oct 13, 2017 at 9:16
  • You should clarify then (by editing the question please) what it is exactly, that you are trying to achieve: fix the generated code once, fix the generated code automatically/repeatedly by creating some helper script (after all if it is generated, it could happen again, when you get a "new version" of it), only find out about the errors to the tell the person who maintains the generator to fix them. As it stands, this questions has IMHO too many possible closure reasons ("unclear what your asking", "off topic/no code", "too broad"). Commented Oct 13, 2017 at 9:21

1 Answer 1

1

You can use a tool like Nagelfar for syntax analysis; the website even has an online demo that you can try. It might not catch all the problems, but it could catch some.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.