extern const char *progname;
+#define TRAINMX_PORT 2883
+
/*---------- types ----------*/
typedef unsigned char Byte;
#define CTYPE(isfoobar,ch) (isfoobar((unsigned char)(ch)))
#define COMMA ,
+#define STR2(x) #x
+#define STR(x) STR2(x)
+
#endif /*COMMON_H*/
%option header-file="record-l.h"
%{
-#define STR record_yylval.name= record_tempzone_strdup(yytext); return
+#define STRT record_yylval.name= record_tempzone_strdup(yytext); return
%}
%%
-train { STR TRAIN; }
-seg { STR SEG; }
-feature { STR FEATURE; }
-is { STR IS; }
-at { STR AT; }
-has { STR HAS; }
-inverted { STR INVERTED; }
-step { STR STEP; }
-stops { STR STOPS; }
-home { STR HOME; }
-end { STR END; }
+train { STRT TRAIN; }
+seg { STRT SEG; }
+feature { STRT FEATURE; }
+is { STRT IS; }
+at { STRT AT; }
+has { STRT HAS; }
+inverted { STRT INVERTED; }
+step { STRT STEP; }
+stops { STRT STOPS; }
+home { STRT HOME; }
+end { STRT END; }
/* new keywords must be added to %token<name> and ident: in record-y.y */
-[A-Za-z][A-Za-z0-9_]+ { STR IDENT; }
-[a-z] { STR FEATLETTER; }
+[A-Za-z][A-Za-z0-9_]+ { STRT IDENT; }
+[a-z] { STRT FEATLETTER; }
[0-9]{0,8} { record_yylval.num= strtoul(yytext,0,10); return NUM; }
[0-9]{9} { record_yyerror("number too long"); }