title: Parser Generator: How to use GPLEX and GPPG together?
body: <p>After looking through posts for good C# parser generators, I stumbled across GPLEX and GPPG.  I'd like to use GPLEX to generate tokens for GPPG to parse and create a tree (similar to the lex/yacc relationship).  However, I can't seem to find an example on how these two interact together.  With lex/yacc, lex returns tokens that are defined by yacc, and can store values in yylval.  How is this done in GPLEX/GPPG (it is missing from their documentation)?</p>
  
  <p>Attached is the lex code I would like to convert over to GPLEX:</p>
  
  <pre><code>%{
   #include &lt;stdio.h&gt;
   #include "y.tab.h"
  %}
  %%
  [Oo][Rr]                return OR;
  [Aa][Nn][Dd]            return AND;
  [Nn][Oo][Tt]            return NOT;
  [A-Za-z][A-Za-z0-9_]*   yylval=yytext; return ID;
  %%
  </code></pre>
  
  <p>Thanks!
  Andrew</p>