Question: Can the lexer access the token value?
brian moroz <[email protected]> Sun, 13 Jun 2021 18:10:48 -0400
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <CAK=qmk73V-rcf0BoHHk-Gy7WvHN1zg2C0CgJ5MXnw0xFkjL=PA@mail.gmail.com> |
--===============8831513096552109919== Content-Type: multipart/alternative; boundary="00000000000000b88905c4ad04ca" --00000000000000b88905c4ad04ca Content-Type: text/plain; charset="UTF-8" Hi, We're working on upgrading an older piece of software where the scanning and parsing was done using hand-written codes and has encountered many problems over the years. We're looking at tools to migrate towards and the Spirit lexer and parser tools are possibilities. Also this will be a staged migration--we can't do everything at once. Right now we're only interested in Spirit lex. Question: Can the lexer access/retrieve the actual string token during scanning. For example, Flex can do this using the yytext() function. The examples I've seen on the web including the Boost site do not illustrate how this can be done using just Spirit lex. Thanks, Brian -- *Brian E. Moroz* *[email protected] <[email protected]>* *[email protected] <[email protected]>* --00000000000000b88905c4ad04ca Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Hi,</div><div><br></div><div>We're working on upg= rading an older piece of software where the scanning and parsing was done u= sing hand-written codes and has encountered many problems over the years. W= e're looking at tools to migrate towards and the Spirit lexer and parse= r tools are possibilities. Also this will be a staged migration--we can'= ;t do everything at once. Right now we're only interested in Spirit lex= .<br></div><div><br></div><div>Question: Can the lexer access/retrieve the = actual string token during scanning. For example, Flex can do this using th= e yytext() function. The examples I've seen on the web including the Bo= ost site do not illustrate how this can be done using just Spirit lex.</div= ><div><br></div><div>Thanks,</div><div>Brian<br></div><div><br>-- <br><div = dir=3D"ltr" class=3D"gmail_signature" data-smartmail=3D"gmail_signature"><d= iv dir=3D"ltr"><b>Brian E. Moroz</b><div><div><i><font size=3D"1"><a href= =3D"mailto:[email protected]" target=3D"_blank">[email protected]</a></fo= nt></i></div><div><i><font size=3D"1"><a href=3D"mailto:bmoroz@cs3computing= .com" target=3D"_blank">[email protected]</a></font></i></div></div><= /div></div></div></div> --00000000000000b88905c4ad04ca-- --===============8831513096552109919== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============8831513096552109919== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Spirit-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/spirit-general --===============8831513096552109919==--