Commit f537954a authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

expr added support for geographical lon/lat coordinates

parent 4ea9f2a4
......@@ -38,8 +38,10 @@ Constansts: M_PI, M_E
#include "cdo.h"
#include "cdo_int.h"
#include "pstream.h"
#include "grid.h"
#include "expr.h"
int getSurfaceID(int vlistID);
static
char *exprs_from_arg(const char *arg)
......@@ -121,6 +123,8 @@ void *Expr(void *argument)
int vlistID1 = streamInqVlist(streamID1);
int nvars1 = vlistNvars(vlistID1);
int surfaceID = getSurfaceID(vlistID1);
paramType *params = (paramType*) Malloc(MAX_PARAMS*sizeof(paramType));
memset(params, 0, MAX_PARAMS*sizeof(paramType));
parse_arg.maxparams = MAX_PARAMS;
......@@ -133,6 +137,7 @@ void *Expr(void *argument)
parse_arg.gridID2 = -1;
parse_arg.zaxisID2 = -1;
parse_arg.tsteptype2 = -1;
parse_arg.surfaceID = surfaceID;
parse_arg.needed = (bool*) Malloc(nvars1*sizeof(bool));
char name[CDI_MAX_NAME];
......@@ -152,6 +157,7 @@ void *Expr(void *argument)
vlistInqVarUnits(vlistID1, varID, units);
params[varID].select = false;
params[varID].coord = 0;
params[varID].gridID = gridID;
params[varID].zaxisID = zaxisID;
params[varID].steptype = steptype;
......@@ -181,7 +187,8 @@ void *Expr(void *argument)
if ( cdoVerbose )
for ( int varID = 0; varID < parse_arg.nparams; varID++ )
printf("var: %d %s ngp=%d nlev=%d\n", varID, params[varID].name, params[varID].ngp, params[varID].nlev);
printf("var: %d %s ngp=%d nlev=%d coord=%c\n",
varID, params[varID].name, params[varID].ngp, params[varID].nlev, params[varID].coord);
int vlistID2 = -1;
if ( REPLACES_VARIABLES(operatorID) )
......@@ -199,7 +206,8 @@ void *Expr(void *argument)
for ( int pidx = 0; pidx < parse_arg.nparams; pidx++ )
{
if ( pidx < nvars1 && params[pidx].select == false ) continue;
if ( *params[pidx].name == '_' ) continue;
if ( pidx >= nvars1 && *params[pidx].name == '_' ) continue;
if ( pidx >= nvars1 && params[pidx].coord ) continue;
int varID = vlistDefVar(vlistID2, params[pidx].gridID, params[pidx].zaxisID, params[pidx].steptype);
vlistDefVarName(vlistID2, varID, params[pidx].name);
vlistDefVarMissval(vlistID2, varID, params[pidx].missval);
......@@ -231,41 +239,53 @@ void *Expr(void *argument)
{
if ( parse_arg.needed[varID] )
{
int ngp = params[varID].ngp;
int nlev = params[varID].nlev;
size_t ngp = params[varID].ngp;
size_t nlev = params[varID].nlev;
params[varID].data = (double*) Malloc(ngp*nlev*sizeof(double));
}
}
/*
for ( int varID = 0; varID < nvars; varID++ )
{
parse_arg.vardata2[varID] = params[varID].data;
}
*/
// printf(">>>> nvars1, nvars, nvars2 %d %d %d\n", nvars1, nvars, nvars2);
for ( int varID = parse_arg.nvars1; varID < parse_arg.nparams; varID++ )
{
int gridID = params[varID].gridID;
int zaxisID = params[varID].zaxisID;
int ngp = gridInqSize(gridID);
int nlev = zaxisInqSize(zaxisID);
// int ngp = params[varID].ngp;
// int nlev = params[varID].nlev;
// printf("name %s ngp %d nlev %d\n", params[varID].name, ngp, nlev);
size_t ngp = params[varID].ngp;
size_t nlev = params[varID].nlev;
params[varID].data = (double*) Malloc(ngp*nlev*sizeof(double));
}
/*
for ( int varID = nvars; varID < nvars2; varID++ )
{
int gridID = vlistInqVarGrid(vlistID2, varID);
int zaxisID = vlistInqVarZaxis(vlistID2, varID);
int gridsize = gridInqSize(gridID);
int nlevel = zaxisInqSize(zaxisID);
parse_arg.vardata2[varID] = (double*) Malloc(gridsize*nlevel*sizeof(double));
for ( int varID = parse_arg.nvars1; varID < parse_arg.nparams; varID++ )
{
int coord = params[varID].coord;
if ( coord )
{
int gridID = params[varID].gridID;
if ( coord == 'x' || coord == 'y' )
{
if ( gridInqType(gridID) == GRID_GENERIC )
cdoAbort("Not a geographical coordinate!", params[varID].name);
if ( gridInqType(gridID) == GRID_GME )
gridID = gridToUnstructured(gridID, 0);
if ( gridInqType(gridID) != GRID_UNSTRUCTURED && gridInqType(gridID) != GRID_CURVILINEAR )
gridID = gridToCurvilinear(gridID, 0);
size_t ngp = params[varID].ngp;
char units[CDI_MAX_NAME];
if ( coord == 'x' )
{
gridInqXvals(gridID, params[varID].data);
gridInqXunits(gridID, units);
grid_to_radian(units, ngp, params[varID].data, "grid center lon");
}
else
{
gridInqYvals(gridID, params[varID].data);
gridInqYunits(gridID, units);
grid_to_radian(units, ngp, params[varID].data, "grid center lat");
}
}
if ( gridID != params[varID].gridID ) gridDestroy(gridID);
}
}
*/
int nrecs;
int tsID = 0;
while ( (nrecs = streamInqTimestep(streamID1, tsID)) )
......
......@@ -39,7 +39,7 @@
#define IS_SURFACE_LEVEL(zaxisID) (zaxisInqType(zaxisID) == ZAXIS_SURFACE && zaxisInqSize(zaxisID) == 1)
static
int getSurfaceID(int vlistID)
{
int surfID = -1;
......
......@@ -104,6 +104,7 @@ void param_meta_copy(paramType *out, paramType *in)
out->nlev = in->nlev;
out->missval = in->missval;
out->nmiss = 0;
out->coord = 0;
out->name = NULL;
}
......@@ -922,6 +923,7 @@ int exNode(nodeType *p, parse_param_t *parse_arg)
nodeType *expr_run(nodeType *p, parse_param_t *parse_arg)
{
paramType *params = parse_arg->params;
int gridID1 = -1, zaxisID1 = -1, tsteptype1 = -1;
int varID;
nodeType *rnode = NULL;
......@@ -950,14 +952,51 @@ nodeType *expr_run(nodeType *p, parse_param_t *parse_arg)
if ( parse_arg->debug )
printf("\tpush var \t%s\n", p->u.var.nm);
const char *vnm = p->u.var.nm;
int nvars = parse_arg->nparams;
for ( varID = nvars-1; varID >= 0; --varID )
{
if ( strcmp(parse_arg->params[varID].name, p->u.var.nm) == 0 ) break;
if ( strcmp(params[varID].name, p->u.var.nm) == 0 ) break;
}
if ( varID == -1 )
{
size_t len = strlen(vnm);
int coord = vnm[len-1];
if ( len > 2 && vnm[len-2] == '.' )
if ( coord == 'x' || coord == 'y' || coord == 'a' )
{
char *varname = strdup(vnm);
varname[len-2] = 0;
for ( varID = nvars-1; varID >= 0; --varID )
{
if ( strcmp(params[varID].name, varname) == 0 ) break;
}
free(varname);
if ( varID == -1 )
{
cdoAbort("Coordinate %c: variable >%s< not found!", coord, varname);
}
else
{
int nvarID = parse_arg->nparams;
if ( nvarID >= parse_arg->maxparams )
cdoAbort("Too many parameter (limit=%d)", parse_arg->maxparams);
params[nvarID].coord = coord;
params[nvarID].name = strdup(vnm);
params[nvarID].missval = params[varID].missval;
params[nvarID].gridID = params[varID].gridID;
params[nvarID].zaxisID = parse_arg->surfaceID;
params[nvarID].steptype = TIME_CONSTANT;
params[nvarID].ngp = params[varID].ngp;
params[nvarID].nlev = 1;
parse_arg->nparams++;
}
}
}
if ( varID == -1 )
{
cdoAbort("Variable >%s< not found!", p->u.var.nm);
cdoAbort("Variable >%s< not found!", p->u.var.nm);
}
else
{
......@@ -968,17 +1007,17 @@ nodeType *expr_run(nodeType *p, parse_param_t *parse_arg)
parse_arg->needed[varID] = true;
}
gridID1 = parse_arg->params[varID].gridID;
zaxisID1 = parse_arg->params[varID].zaxisID;
tsteptype1 = parse_arg->params[varID].steptype;
nlev1 = parse_arg->params[varID].nlev;
gridID1 = params[varID].gridID;
zaxisID1 = params[varID].zaxisID;
tsteptype1 = params[varID].steptype;
nlev1 = params[varID].nlev;
parse_arg->missval2 = parse_arg->params[varID].missval;
parse_arg->missval2 = params[varID].missval;
if ( parse_arg->gridID2 == -1 )
parse_arg->gridID2 = gridID1;
// printf(">> typeVar: zaxisID2 %d %s\n", parse_arg->zaxisID2, parse_arg->params[varID].name);
// printf(">> typeVar: zaxisID2 %d %s\n", parse_arg->zaxisID2, params[varID].name);
if ( parse_arg->zaxisID2 != -1 ) nlev2 = zaxisInqSize(parse_arg->zaxisID2);
if ( parse_arg->zaxisID2 == -1 || (nlev1 > 1 && nlev2 == 1) )
......@@ -990,8 +1029,8 @@ nodeType *expr_run(nodeType *p, parse_param_t *parse_arg)
}
/* else */
{
param_meta_copy(&p->param, &parse_arg->params[varID]);
p->param.name = parse_arg->params[varID].name;
param_meta_copy(&p->param, &params[varID]);
p->param.name = params[varID].name;
/*
if ( parse_arg->debug )
printf("var: u.var.nm=%s name=%s gridID=%d zaxisID=%d ngp=%d nlev=%d varID=%d\n",
......@@ -1000,8 +1039,8 @@ nodeType *expr_run(nodeType *p, parse_param_t *parse_arg)
p->ltmpvar = false;
if ( ! parse_arg->init )
{
p->param.data = parse_arg->params[varID].data;
p->param.nmiss = parse_arg->params[varID].nmiss;
p->param.data = params[varID].data;
p->param.nmiss = params[varID].nmiss;
}
rnode = p;
}
......@@ -1027,9 +1066,9 @@ nodeType *expr_run(nodeType *p, parse_param_t *parse_arg)
parse_arg->zaxisID2 = -1;
parse_arg->tsteptype2 = -1;
// printf(">> = init1: zaxisID2 %d %s\n", parse_arg->zaxisID2, parse_arg->params[varID].name);
// printf(">> = init1: zaxisID2 %d %s\n", parse_arg->zaxisID2, params[varID].name);
rnode = expr_run(p->u.opr.op[1], parse_arg);
// printf(">> = init2: zaxisID2 %d %s\n", parse_arg->zaxisID2, parse_arg->params[varID].name);
// printf(">> = init2: zaxisID2 %d %s\n", parse_arg->zaxisID2, params[varID].name);
if ( parse_arg->init )
{
......@@ -1046,11 +1085,11 @@ nodeType *expr_run(nodeType *p, parse_param_t *parse_arg)
int nvars = parse_arg->nparams;
for ( varID = nvars-1; varID >= 0; --varID )
{
if ( strcmp(parse_arg->params[varID].name, varname2) == 0 ) break;
if ( strcmp(params[varID].name, varname2) == 0 ) break;
}
if ( varID >= 0 )
{
if ( varID < parse_arg->nvars1 ) parse_arg->params[varID].select = true;
if ( varID < parse_arg->nvars1 ) params[varID].select = true;
else cdoWarning("Variable %s already defined!", varname2);
}
else
......@@ -1059,13 +1098,14 @@ nodeType *expr_run(nodeType *p, parse_param_t *parse_arg)
if ( varID >= parse_arg->maxparams )
cdoAbort("Too many parameter (limit=%d)", parse_arg->maxparams);
parse_arg->params[varID].name = strdup(varname2);
parse_arg->params[varID].missval = parse_arg->missval2;
parse_arg->params[varID].gridID = parse_arg->gridID2;
parse_arg->params[varID].zaxisID = parse_arg->zaxisID2;
parse_arg->params[varID].steptype = parse_arg->tsteptype2;
parse_arg->params[varID].ngp = gridInqSize(parse_arg->gridID2);
parse_arg->params[varID].nlev = zaxisInqSize(parse_arg->zaxisID2);
params[varID].coord = 0;
params[varID].name = strdup(varname2);
params[varID].missval = parse_arg->missval2;
params[varID].gridID = parse_arg->gridID2;
params[varID].zaxisID = parse_arg->zaxisID2;
params[varID].steptype = parse_arg->tsteptype2;
params[varID].ngp = gridInqSize(parse_arg->gridID2);
params[varID].nlev = zaxisInqSize(parse_arg->zaxisID2);
parse_arg->nparams++;
}
}
......@@ -1077,23 +1117,22 @@ nodeType *expr_run(nodeType *p, parse_param_t *parse_arg)
int nvars = parse_arg->nparams;
for ( varID = nvars-1; varID >= 0; --varID )
{
if ( strcmp(parse_arg->params[varID].name, p->u.opr.op[0]->u.var.nm) == 0 ) break;
if ( strcmp(params[varID].name, p->u.opr.op[0]->u.var.nm) == 0 ) break;
}
if ( varID < 0 )
{
cdoAbort("Variable >%s< not found!", p->u.opr.op[0]->u.var.nm);
}
else
{
parse_arg->gridID2 = parse_arg->params[varID].gridID;
parse_arg->zaxisID2 = parse_arg->params[varID].zaxisID;
// printf(">> = run: zaxisID2 %d %s\n", parse_arg->zaxisID2, parse_arg->params[varID].name);
parse_arg->tsteptype2 = parse_arg->params[varID].steptype;
param_meta_copy(&p->param, &parse_arg->params[varID]);
p->param.name = parse_arg->params[varID].name;
p->param.data = parse_arg->params[varID].data;
parse_arg->gridID2 = params[varID].gridID;
parse_arg->zaxisID2 = params[varID].zaxisID;
// printf(">> = run: zaxisID2 %d %s\n", parse_arg->zaxisID2, params[varID].name);
parse_arg->tsteptype2 = params[varID].steptype;
param_meta_copy(&p->param, &params[varID]);
p->param.name = params[varID].name;
p->param.data = params[varID].data;
p->ltmpvar = false;
//printf(">>copy %s\n", p->param.name);
......
......@@ -38,16 +38,17 @@ typedef struct {
// parameter
typedef struct {
bool select;
int gridID;
int zaxisID;
int steptype;
int ngp;
int nlev;
int nmiss;
char *name;
char *longname;
char *units;
bool select;
int coord;
int gridID;
int zaxisID;
int steptype;
int ngp;
int nlev;
int nmiss;
char *name;
char *longname;
char *units;
double missval;
double *data;
} paramType;
......@@ -80,6 +81,7 @@ typedef struct {
int gridID2;
int zaxisID2;
int tsteptype2;
int surfaceID;
double missval2;
paramType *params;
} parse_param_t;
......
......@@ -362,8 +362,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 19
#define YY_END_OF_BUFFER 20
#define YY_NUM_RULES 20
#define YY_END_OF_BUFFER 21
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
......@@ -371,27 +371,29 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
static yyconst flex_int16_t yy_acclist[91] =
static yyconst flex_int16_t yy_acclist[93] =
{ 0,
4, 4, 20, 18, 19, 17, 18, 19, 17, 19,
18, 19, 1, 18, 19, 18, 19, 7, 18, 19,
4, 7, 18, 19, 4, 18, 19, 12, 18, 19,
7, 18, 19, 11, 18, 19, 6, 18, 19,16389,
4, 6, 18, 19,16389, 6, 18, 19,16389, 6,
18, 19,16389, 18, 19, 17, 14, 1, 15, 4,
4, 4, 4, 10, 13, 9, 8197, 6,16389, 4,
6,16389, 6,16389, 16, 4, 4, 8, 4, 6,
16389, 3, 6,16389, 6,16389, 4, 2, 6,16389
4, 4, 21, 19, 20, 18, 19, 20, 18, 20,
19, 20, 1, 19, 20, 19, 20, 8, 19, 20,
4, 8, 19, 20, 4, 19, 20, 13, 19, 20,
8, 19, 20, 12, 19, 20, 7, 19, 20,16389,
4, 7, 19, 20,16389, 7, 19, 20,16389, 7,
19, 20,16389, 19, 20, 18, 15, 1, 16, 4,
4, 4, 4, 11, 14, 10, 8197, 6, 7,16389,
4, 7,16389, 7,16389, 17, 4, 4, 9, 6,
4, 7,16389, 3, 7,16389, 7,16389, 4, 2,
7,16389
} ;
static yyconst flex_int16_t yy_accept[52] =
static yyconst flex_int16_t yy_accept[54] =
{ 0,
1, 2, 3, 4, 6, 9, 11, 13, 16, 18,
21, 25, 28, 31, 34, 37, 41, 46, 50, 54,
56, 57, 58, 59, 60, 61, 62, 62, 63, 64,
64, 65, 66, 67, 67, 68, 70, 70, 73, 75,
76, 76, 77, 78, 79, 82, 85, 87, 88, 91,
91
64, 65, 66, 67, 67, 68, 69, 71, 71, 74,
76, 77, 77, 78, 79, 80, 81, 84, 87, 89,
90, 93, 93
} ;
static yyconst YY_CHAR yy_ec[256] =
......@@ -429,62 +431,60 @@ static yyconst YY_CHAR yy_ec[256] =
static yyconst YY_CHAR yy_meta[25] =
{ 0,
1, 1, 2, 3, 1, 1, 1, 3, 1, 1,
1, 3, 1, 1, 1, 3, 3, 3, 3, 3,
3, 3, 3, 1
3, 3, 1, 1, 1, 4, 4, 4, 4, 4,
4, 4, 4, 1
} ;
static yyconst flex_uint16_t yy_base[53] =
static yyconst flex_uint16_t yy_base[56] =
{ 0,
0, 0, 87, 88, 23, 26, 72, 0, 78, 88,
19, 32, 70, 69, 68, 30, 31, 52, 37, 57,
44, 88, 0, 88, 0, 88, 41, 0, 0, 42,
65, 88, 88, 53, 88, 57, 66, 23, 45, 88,
65, 53, 56, 88, 53, 49, 50, 88, 36, 88,
73, 29
0, 0, 82, 83, 23, 26, 67, 0, 73, 83,
19, 32, 65, 64, 59, 30, 43, 23, 48, 45,
54, 83, 0, 83, 0, 83, 36, 0, 0, 49,
52, 83, 83, 56, 83, 0, 0, 41, 28, 44,
83, 40, 51, 54, 83, 0, 0, 0, 20, 83,
0, 83, 71, 73, 28
} ;
static yyconst flex_int16_t yy_def[53] =
static yyconst flex_int16_t yy_def[56] =
{ 0,
50, 1, 50, 50, 50, 50, 50, 51, 50, 50,
50, 50, 50, 50, 50, 52, 52, 52, 52, 50,
50, 50, 51, 50, 11, 50, 50, 11, 12, 50,
50, 50, 50, 50, 50, 19, 50, 18, 19, 50,
50, 50, 50, 50, 19, 19, 19, 50, 19, 0,
50, 50
52, 1, 52, 52, 52, 52, 52, 53, 52, 52,
52, 52, 52, 52, 52, 54, 54, 17, 17, 52,
52, 52, 53, 52, 11, 52, 52, 11, 12, 52,
52, 52, 52, 52, 52, 55, 17, 52, 17, 17,
52, 52, 52, 52, 52, 55, 17, 17, 17, 52,
17, 0, 52, 52, 52
} ;
static yyconst flex_uint16_t yy_nxt[113] =
static yyconst flex_uint16_t yy_nxt[108] =
{ 0,
4, 5, 6, 5, 7, 8, 9, 10, 10, 10,
11, 12, 13, 14, 15, 16, 17, 18, 16, 19,
16, 16, 18, 20, 21, 21, 21, 21, 21, 21,
25, 36, 50, 34, 34, 26, 27, 35, 35, 45,
34, 27, 28, 29, 35, 21, 21, 21, 26, 30,
41, 37, 42, 43, 30, 34, 34, 36, 39, 35,
35, 37, 46, 38, 42, 47, 36, 43, 49, 26,
36, 36, 48, 23, 36, 23, 42, 43, 36, 44,
40, 33, 32, 31, 24, 22, 50, 3, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50
25, 46, 38, 34, 39, 26, 27, 35, 51, 39,
36, 27, 28, 29, 47, 42, 34, 43, 26, 30,
35, 43, 44, 36, 30, 21, 21, 21, 38, 34,
44, 48, 43, 35, 49, 44, 45, 26, 41, 40,
50, 23, 33, 23, 23, 37, 37, 32, 31, 24,
22, 52, 3, 52, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52, 52
} ;
static yyconst flex_int16_t yy_chk[113] =
static yyconst flex_int16_t yy_chk[108] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 5, 5, 5, 6, 6, 6,
11, 52, 38, 16, 17, 11, 11, 16, 17, 38,
19, 11, 12, 12, 19, 21, 21, 21, 12, 12,
27, 30, 27, 30, 12, 18, 34, 49, 19, 18,
34, 18, 39, 18, 42, 39, 39, 43, 47, 42,
46, 47, 43, 51, 45, 51, 41, 37, 36, 31,
20, 15, 14, 13, 9, 7, 3, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50
11, 55, 18, 16, 18, 11, 11, 16, 49, 39,
16, 11, 12, 12, 39, 27, 17, 27, 12, 12,
17, 42, 38, 17, 12, 21, 21, 21, 30, 34,
30, 40, 43, 34, 40, 44, 31, 43, 20, 19,
44, 53, 15, 53, 53, 54, 54, 14, 13, 9,
7, 3, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52, 52
} ;
#define YY_TRAILING_MASK 0x2000
......@@ -847,14 +847,14 @@ yy_match:
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 51 )
if ( yy_current_state >= 53 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
*yyg->yy_state_ptr++ = yy_current_state;
++yy_cp;
}
while ( yy_base[yy_current_state] != 88 );
while ( yy_base[yy_current_state] != 83 );
yy_find_action:
yy_current_state = *--yyg->yy_state_ptr;
......@@ -944,81 +944,90 @@ YY_RULE_SETUP
YY_BREAK
case 6:
YY_RULE_SETUP
#line 66 "expr_lex.l"
#line 65 "expr_lex.l"
{
/* Recognize coordinates, e.g., var_nm.x (lon of var_nm) */
yylval->varnm = strdup(yytext);
return VARIABLE;
}
YY_BREAK
case 7:
YY_RULE_SETUP
#line 72 "expr_lex.l"
#line 71 "expr_lex.l"
{
return *yytext;
yylval->varnm = strdup(yytext);
return VARIABLE;
}
YY_BREAK
case 8:
YY_RULE_SETUP
#line 76 "expr_lex.l"
return LEG;
#line 77 "expr_lex.l"
{
return *yytext;
}
YY_BREAK
case 9:
YY_RULE_SETUP
#line 77 "expr_lex.l"
return GE;
#line 81 "expr_lex.l"
return LEG;
YY_BREAK
case 10:
YY_RULE_SETUP
#line 78 "expr_lex.l"
return LE;
#line 82 "expr_lex.l"
return GE;
YY_BREAK
case 11:
YY_RULE_SETUP
#line 79 "expr_lex.l"
return GT;
#line 83 "expr_lex.l"
return LE;
YY_BREAK
case 12:
YY_RULE_SETUP
#line 80 "expr_lex.l"
return LT;