Home > Ax Technical > Parsing Source Code

Parsing Source Code


     Sometimes its required that we parse the source code written in the classes, Axapata has a class that will help us in doing this. SysScanner Class is the one that will do the Job, it has so many options that will help us in parsing the code easily. Here is a small piece of code on that.
static void JobSysScannerClass(Args _args)
    TreeNode        treeNode   = TreeNode::findNode(#Classespath + ‘\\Class1\\Check’);
    SysScannerClass sc         = new SysScannerClass(treeNode);
    int             lineCnt = 1;
    while (lineCnt < sc.lines())
        print sc.sourceLine(lineCnt);
it also has options to find if the code has the standard symbols like ttscommit, ttsbegin, print,
for this you have to use the Macro #tokentypes which has the integer values for all the standard key words
………………My first showpiece


  1. AxCoder wrote:
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: