Note that there are some explanatory texts on larger screens.

plurals
  1. POTool to parse a file
    text
    copied!<p>I'm trying to figure out the best way to parse a GE Logician MEL trace file to make it easier to read.</p> <p>It has segments like </p> <pre>>{!gDYNAMIC_3205_1215032915_810 = (clYN)} execute>GDYNAMIC_3205_1215032915_810 = "Yes, No" results>"Yes, No" execute>end results>"Yes, No" >{!gDYNAMIC_3205_1215032893_294 = (clYN)} execute>GDYNAMIC_3205_1215032893_294 = "Yes, No" results>"Yes, No" execute>end results>"Yes, No" </pre> <p>and</p> <pre>>{IF (STR(F3205_1220646638_285, F3205_1220646638_301) == "") THEN "" ELSE (\par\tab fnHeadingFormat("Depression") + CFMT(F3205_1220646638_285, "", "Have you often been bothered by feeling down, depressed or hopeless? ", "B", "\par ") + CFMT(F3205_1220646638_301, "", "Have you often been bothered by little interest or pleasure in doing things? ", "B", "\par ") ) ENDIF} execute>call STR("No", "No") results>"NoNo" execute>"NoNo" == "" results>FALSE execute>if FALSE results>FALSE execute>call FNHEADINGFORMAT("Depression") execute>call CFMT("Depression", "B,2") results>"\fs24\b Depression\b0\fs20 " execute>"\r\n" + "\fs24\b Depression\b0\fs20 " results>"\r\n\fs24\b Depression\b0\fs20 " execute>"\r\n\fs24\b Depression\b0\fs20 " + "\r\n" results>"\r\n\fs24\b Depression\b0\fs20 \r\n" results>return "\r\n\fs24\b Depression\b0\fs20 \r\n" execute>call CFMT("No", "", "Have you often been bothered by feeling down, depressed or hopeless? ", "B", "\par ") results>"\b Have you often been bothered by feeling down, depressed or hopeless? \b0 No\par " execute>"\r\n\fs24\b Depression\b0\fs20 \r\n" + "\b Have you often been bothered by feeling down, depressed or hopeless? \b0 No\par " results>"\r\n\fs24\b Depression\b0\fs20 \r\n\b Have you often been bothered by feeling down, depressed or hopeless? \b0 No\par " execute>call CFMT("No", "", "Have you often been bothered by little interest or pleasure in doing things? ", "B", "\par ") results>"\b Have you often been bothered by little interest or pleasure in doing things? \b0 No\par " execute>"\r\n\fs24\b Depression\b0\fs20 \r\n\b Have you often been bothered by feeling down, depressed or hopeless? \b0 No\par " + "\b Have you often been bothered by little interest or pleasure in doing things? \b0 No\par " results>"\r\n\fs24\b Depression\b0\fs20 \r\n\b Have you often been bothered by feeling down, depressed or hopeless? \b0 No\par \b Have you often been bothered by little interest or pleasure in doing things? \b0 No\par " </pre> <p>I could grovel through doing it procedurally, but after all the regexps I've worked with, I find it hard to believe there's nothing out there that will let me define the rules for parsing the file in a similar manner. Am I wrong?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload