<div dir="ltr">Ciao a tutti,<div>avrei necessità di scrivermi un parser per JCL(<a href="https://it.wikipedia.org/wiki/Job_Control_Language">https://it.wikipedia.org/wiki/Job_Control_Language</a> )</div><div><br></div><div>In particolare, dato un input di questo tipo:</div>//POPRRIEP  JOB  <br>//POP14RS1 EXEC PGM=SORT,TIME=1440 <br><div>//STEPLIB  DD  DSNAME=SYS1.LINKLIB,DISP=SHR</div><div><br></div><div>Ottenere un output cosi fatto:</div><div>{<br>    name: "POPRRIEP",<br>    steps: [<br>        {<br>            NAME: "POP14RS1"<br>            PGM: "SORT"<br>            TIME: "1440"<br>            DDS: [<br>                {<br>                    NAME: "STEPLIB",<br>                    DSNAME: "SYS1.LINKLIB",<br>                    DISP: "SHR"<br>                }<br>            ]<br>        }<br>    ]<br>} <br></div><div><br></div><div><br></div><div>Ora, prima di partire in guarda e di incartarmi in una serie infinita di for & if, volevo sapere se qualcuno ha qualche approccio particolare da consigliare.</div><div><br></div><div>Grazie,</div><div>Ciao.</div><div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Victor</div></div></div></div></div></div><div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br> <table style="border-top:1px solid #d3d4de">
        <tr>
      <td style="width:55px;padding-top:18px"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;"></a></td>
                <td style="width:470px;padding-top:17px;color:#41424e;font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">Mail priva di virus. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank" style="color:#4453ea">www.avast.com</a>          </td>
        </tr>
</table>
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"></a></div>