20 parser tracing functions, 1 ptrace( ) : parser trace, Parser tracing functions – Teledyne LeCroy UWBTrainer Exerciser Script Language User Manual
Page 108: Ptrace( ) : parser trace, Ptrace inst

LeCroy Corporation
UWBTrainer Exerciser - Generation Script Language Reference Manual
100
10.20 Parser Tracing Functions
Parser tracing functions are debug tools that allow you to follow the generation process. These
functions track script generation procedures and allow you to observe instruction generation and
the changes of values of variables and template structures. Because UWBTrainer can create
sophisticated and dynamic generation scripts, these functions are helpful in debugging.
Note: These functions have no affect on the compiled firmware instruction output. They only
follow the paths taken in scripts to create instructions or values of variables and template
structures.
10.20.1 PTrace( ) : Parser Trace
Format
PTrace( )
Parser Trace without any supplied parameters outputs the line number from which it was called to
the compilation output window.
PTrace( “output_string” )
Parser Trace with a supplied string parameter outputs the supplied string to the compilation
output window when called.
Example
50:
Main
51: {
52: PTrace ()
53:
Send
WM_FRAME
54: {
55: Data = {
AA BB CC DD
}
56: }
57: PTrace (“Sending Second WM_FRAME”)
58:
Send
WM_FRAME
59: {
60: Data = {
EE FF 00 11
}
61: }
62: PTrace ()
63: }
Output Window:
-- Parsing started: File: C:\Sample_PTrace.uwbg. Operation Starts at time 08:44:07 PM --
Parsing...
c:\sample_ptrace_1.uwbg
***Parser Trace Message(c:\sample_ptrace_1.uwbg, line: 52)
Å PTrace( ) from line 52
Sending Second WM_FRAME
(
Å PTrace( … ) from line 57
***Parser Trace Message(c:\sample_ptrace_1.uwbg, line: 62)
Å PTrace( ) from line 62
Parsing is done...
C:\Sample_PTrace_1.uwbg - 0 error(s)
C:\Sample_PTrace_1.uwbg - Generation Blocks : 1, Total number of instructions : 2
-- Parsing Finished: File: C:\Sample_PTrace.uwbg. Operation ends at time 08:44:08 PM --