From aaad1cb600ea88175364adc4d58cd620e12c083f Mon Sep 17 00:00:00 2001
From: Tony Farrell <tony.farrell@mq.edu.au>
Date: Tue, 18 Mar 2003 15:29:25 +1100
Subject: [PATCH] Get working under MacOsX - lex is flex

     Modify messlexer.l to support define yywrap for MacOsX, define
     YYINPUT and yylineno when used with FLEX (indicated by input not being defined).
     Keep messlexer.c about as version built automatically can be a problem.
---
 dmakefile   |    2 +-
 messlexer.c | 1667 +++++++++++++++++++++++++++++++++++++++++++++++++++
 messlexer.l |   15 +-
 3 files changed, 1679 insertions(+), 5 deletions(-)
 create mode 100644 messlexer.c

diff --git a/dmakefile b/dmakefile
index 0686c33..bd8ff2a 100644
--- a/dmakefile
+++ b/dmakefile
@@ -27,7 +27,7 @@
 #BeginConfig                    /* Begin the configuration section */
 #Generated from dmakefile for MESSGEN
 #DramaSystem                    /* Indicates we are part of drama itself */ 
-ACMM_RELEASE=3_2$(ACMMBUILDVER)
+ACMM_RELEASE=3_3$(ACMMBUILDVER)
 RELEASE=r$(ACMM_RELEASE)
 SYSTEM=messgen				/* System name (for release	*/
 USERCCOPTIONS = AnsiCFull()     /* Enable full Ansi C compatibilty      */
diff --git a/messlexer.c b/messlexer.c
new file mode 100644
index 0000000..da716cd
--- /dev/null
+++ b/messlexer.c
@@ -0,0 +1,1667 @@
+#include <stdio.h>
+#include <stdlib.h>
+# define U(x) x
+# define NLSTATE yyprevious=YYNEWLINE
+# define BEGIN yybgin = yysvec + 1 +
+# define INITIAL 0
+# define YYLERR yysvec
+# define YYSTATE (yyestate-yysvec-1)
+# define YYOPTIM 1
+# ifndef YYLMAX 
+# define YYLMAX BUFSIZ
+# endif 
+#ifndef __cplusplus
+# define output(c) (void)putc(c,yyout)
+#else
+# define lex_output(c) (void)putc(c,yyout)
+#endif
+
+#if defined(__cplusplus) || defined(__STDC__)
+
+#if defined(__cplusplus) && defined(__EXTERN_C__)
+extern "C" {
+#endif
+	int yyback(int *, int);
+	int yyinput(void);
+	int yylook(void);
+	void yyoutput(int);
+	int yyracc(int);
+	int yyreject(void);
+	void yyunput(int);
+	int yylex(void);
+#ifdef YYLEX_E
+	void yywoutput(wchar_t);
+	wchar_t yywinput(void);
+#endif
+#ifndef yyless
+	int yyless(int);
+#endif
+#ifndef yywrap
+	int yywrap(void);
+#endif
+#ifdef LEXDEBUG
+	void allprint(char);
+	void sprint(char *);
+#endif
+#if defined(__cplusplus) && defined(__EXTERN_C__)
+}
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+	void exit(int);
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+# define unput(c) {yytchar= (c);if(yytchar=='\n')yylineno--;*yysptr++=yytchar;}
+# define yymore() (yymorfg=1)
+#ifndef __cplusplus
+# define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)
+#else
+# define lex_input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)
+#endif
+#define ECHO fprintf(yyout, "%s",yytext)
+# define REJECT { nstr = yyreject(); goto yyfussy;}
+int yyleng;
+#define YYISARRAY
+char yytext[YYLMAX];
+int yymorfg;
+extern char *yysptr, yysbuf[];
+int yytchar;
+FILE *yyin,*yyout;
+extern int yylineno;
+struct yysvf { 
+	struct yywork *yystoff;
+	struct yysvf *yyother;
+	int *yystops;};
+struct yysvf *yyestate;
+extern struct yysvf yysvec[], *yybgin;
+
+# line 3 "messlexer.l"
+/*		M E S S L E X E R . L
+ *
+ * Function:
+ *    Lexical analyzer generator for the messgen portable message system
+ *	generator.  This file should be run though lex to generate the
+ *      lexical analyzer
+ *   
+ *  Copyright (c) Anglo-Australian Telescope Board, 1995.
+ *  Not to be used for commercial purposes without AATB permission.
+ *  
+ *     @(#) $Id$
+ *
+ * History:
+ *      27-Aug-1992 - TJF - Original version.
+ *      14-Apr-1994 - TJF - Support __VMS macro
+ *      13-Aug-1997 - TJF - Add yywrap under WIN32
+ *      14-Mar-2003 - TJF - Add yywrap under MacOsX.
+ */
+#include "messgen.h"
+#include "messparser.h"
+#if defined(VMS) || defined(__VMS) || defined(WIN32) || defined(__linux__) || defined(__APPLE__)
+int yywrap() { return(1); }
+#endif
+
+extern char *ProgName;
+
+# line 28 "messlexer.l"
+/*
+ * Internal function prototypes
+ */
+static int L__getc(FILE *);
+static void flushLine();
+static void makeString(LexStringType *string);
+
+
+# line 35 "messlexer.l"
+/*
+ *  We have our own version of the Lex ECHO macro.  It only does anything
+ *	when DEBUG is defined.
+ */
+#undef ECHO
+#ifdef DEBUG
+#   define ECHO printf ("%s on line %d\n",yytext,yylineno);
+#else
+#   define ECHO
+#endif
+
+# line 45 "messlexer.l"
+/*
+ * Our own input routine.  Use YYINPUT for flex, which also required that we 
+ & declare yylineno.
+ */
+#ifdef input
+#    undef input
+#    define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):L__getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)
+#else
+     int yylineno;
+#    define YYINPUT() (((yytchar=yysptr>yysbuf?U(*--yysptr):L__getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)
+#endif
+
+# line 56 "messlexer.l"
+/*
+ *  The COMRET implements a common return sequence of setting yylval to the line
+ *   number and returning a token name.
+ */
+#define COMRET(A) { ECHO yylval.lnum = yylineno ; return(A) ; }
+
+# line 61 "messlexer.l"
+/*
+ *  Now Setup for Lex itself.
+ */
+# define YYNEWLINE 10
+yylex(){
+int nstr; extern int yyprevious;
+#ifdef __cplusplus
+/* to avoid CC and lint complaining yyfussy not being used ...*/
+static int __lex_hack = 0;
+if (__lex_hack) goto yyfussy;
+#endif
+while((nstr = yylook()) >= 0)
+yyfussy: switch(nstr){
+case 0:
+if(yywrap()) return(0); break;
+case 1:
+
+# line 77 "messlexer.l"
+{ flushLine(); }
+break;
+case 2:
+
+# line 78 "messlexer.l"
+	{ flushLine(); }
+break;
+case 3:
+
+# line 79 "messlexer.l"
+		{ flushLine(); }
+break;
+case 4:
+
+# line 80 "messlexer.l"
+	{ flushLine(); }
+break;
+case 5:
+
+# line 81 "messlexer.l"
+			        { flushLine(); }
+break;
+case 6:
+
+# line 82 "messlexer.l"
+{ COMRET(tFACILITY) }
+break;
+case 7:
+
+# line 83 "messlexer.l"
+{ COMRET(tSEVERITY) }
+break;
+case 8:
+
+# line 84 "messlexer.l"
+		{  COMRET(tBASE)     }
+break;
+case 9:
+
+# line 85 "messlexer.l"
+			{  COMRET(tEND)	     }
+break;
+case 10:
+
+# line 87 "messlexer.l"
+{  COMRET(tSUCCESS)  }
+break;
+case 11:
+
+# line 88 "messlexer.l"
+				{  COMRET(tINFORMATIONAL) }
+break;
+case 12:
+
+# line 89 "messlexer.l"
+  {  COMRET(tWARNING) }
+break;
+case 13:
+
+# line 90 "messlexer.l"
+                {  COMRET(tERROR)   }
+break;
+case 14:
+
+# line 91 "messlexer.l"
+	{  COMRET(tFATAL)   }
+break;
+case 15:
+
+# line 92 "messlexer.l"
+		{  COMRET(tFATAL)   }
+break;
+case 16:
+
+# line 93 "messlexer.l"
+	{  COMRET(tPREFIX)  }
+break;
+case 17:
+
+# line 94 "messlexer.l"
+				{  makeString(&yylval.string);
+					   return(tTEXT); }
+break;
+case 18:
+
+# line 96 "messlexer.l"
+				{  makeString(&yylval.string);
+					   return(tTEXT); }
+break;
+case 19:
+
+# line 98 "messlexer.l"
+     {fprintf(stderr,"%s:%d:Missing '\"'\n",ProgName,yylineno);
+					   makeString(&yylval.string);
+					   return(tTEXT); }
+break;
+case 20:
+
+# line 101 "messlexer.l"
+     {fprintf(stderr,"%s:%d:Missing '>'\n",ProgName,yylineno);
+					   makeString(&yylval.string);
+					   return(tTEXT); }
+break;
+case 21:
+
+# line 104 "messlexer.l"
+				{  makeString(&yylval.name);
+					   return(tNAME); }
+break;
+case 22:
+
+# line 106 "messlexer.l"
+	{  fprintf(stderr,
+       "%s%d: Warning, dollar signs ($) may not be accepted by C compiler\n",
+					  ProgName,yylineno);       
+					   makeString(&yylval.name);
+					   return(tNAME); }
+break;
+case 23:
+
+# line 111 "messlexer.l"
+{  sscanf(yytext,"%d",&yylval.integer);     return(tINTEGER); }
+break;
+case 24:
+
+# line 112 "messlexer.l"
+{  sscanf(&yytext[2],"%x",&yylval.integer); return(tINTEGER); }
+break;
+case 25:
+
+# line 113 "messlexer.l"
+{  sscanf(&yytext[2],"%o",&yylval.integer); return(tINTEGER); }
+break;
+case 26:
+
+# line 114 "messlexer.l"
+{  sscanf(&yytext[2],"%d",&yylval.integer); return(tINTEGER); }
+break;
+case 27:
+
+# line 115 "messlexer.l"
+				{ return(','); }
+break;
+case 28:
+
+# line 116 "messlexer.l"
+				{ return('/'); }
+break;
+case 29:
+
+# line 117 "messlexer.l"
+				{ return('='); }
+break;
+case 30:
+
+# line 118 "messlexer.l"
+  {fprintf(stderr,"%s:%d:Unknown directive \'%s\'\n",
+					  ProgName,yylineno ,yytext);
+					  flushLine(); }
+break;
+case 31:
+
+# line 121 "messlexer.l"
+				{ /* white space */ }
+break;
+case -1:
+break;
+default:
+(void)fprintf(yyout,"bad switch yylook %d",nstr);
+} return(0); }
+/* end of yylex */
+
+# line 126 "messlexer.l"
+static void flushLine()
+{
+/*
+ *  It is easier to handle comments at this level.  When lex indicates the
+ *  comment initiator has been input, it calls this routine and we read
+ *  until we get the end of line
+ */
+
+    int c;
+#   ifdef DEBUG
+	printf("Flushing line\n");
+#   endif
+
+    do
+    {
+/*
+ *	Read a character.  If we get an end of line, break.  If we get
+ *		 0 indicates EOF or Error
+ */
+	c = input();
+	if (c == '\n')
+	{
+	    unput(c);
+	    break;
+    	}
+    } while (c != 0);
+}
+int L__getc(FILE * in)
+/*
+ *  This routine allows us to read from alterative sources
+ */
+{
+    static int first = 1;
+    {
+/*
+ *	The strange initialisation of yyin and yyout done by default in
+ *	lexers generated by lex is not suitable for VMS so a sed line
+ *	has got rid of it and we must do it here.
+ */
+	if (first)
+	{
+	    yyin = stdin;
+	    yyout = stdout;
+	    in = stdin;
+	    first = 0;
+	}
+	return(getc(in));
+    }
+}
+static void makeString(LexStringType *string)
+{
+/*
+ * Since the space a string is read into by lex is overwritten, we must
+ * malloc some space for strings.  At the same time, we save the current
+ * line number so it can be used in messages related to this string
+ *
+ * Create space for and save the string
+ */
+    string->str = (char *)malloc(strlen(yytext)+1);
+    strcpy(string->str, yytext);
+    string->line_no = yylineno;
+}
+int yyvstop[] = {
+0,
+
+31,
+0, 
+
+5,
+0, 
+
+27,
+0, 
+
+30,
+0, 
+
+28,
+0, 
+
+23,
+0, 
+
+29,
+0, 
+
+21,
+22,
+0, 
+
+21,
+22,
+0, 
+
+21,
+22,
+0, 
+
+21,
+22,
+0, 
+
+21,
+22,
+0, 
+
+21,
+22,
+0, 
+
+21,
+22,
+0, 
+
+21,
+22,
+0, 
+
+21,
+22,
+0, 
+
+21,
+22,
+0, 
+
+19,
+0, 
+
+17,
+0, 
+
+30,
+0, 
+
+30,
+0, 
+
+30,
+0, 
+
+30,
+0, 
+
+30,
+0, 
+
+30,
+0, 
+
+30,
+0, 
+
+30,
+0, 
+
+30,
+0, 
+
+20,
+0, 
+
+18,
+0, 
+
+22,
+0, 
+
+21,
+22,
+0, 
+
+21,
+22,
+0, 
+
+21,
+22,
+0, 
+
+21,
+22,
+0, 
+
+21,
+22,
+0, 
+
+21,
+22,
+0, 
+
+21,
+22,
+0, 
+
+21,
+22,
+26,
+0, 
+
+21,
+22,
+24,
+0, 
+
+21,
+22,
+25,
+0, 
+
+30,
+0, 
+
+30,
+0, 
+
+30,
+0, 
+
+30,
+0, 
+
+30,
+0, 
+
+30,
+0, 
+
+30,
+0, 
+
+30,
+0, 
+
+21,
+22,
+0, 
+
+21,
+22,
+0, 
+
+21,
+22,
+0, 
+
+21,
+22,
+0, 
+
+21,
+22,
+0, 
+
+21,
+22,
+0, 
+
+21,
+22,
+0, 
+
+30,
+0, 
+
+9,
+30,
+0, 
+
+30,
+0, 
+
+30,
+0, 
+
+30,
+0, 
+
+30,
+0, 
+
+30,
+0, 
+
+30,
+0, 
+
+13,
+21,
+22,
+0, 
+
+15,
+21,
+22,
+0, 
+
+11,
+21,
+22,
+0, 
+
+16,
+21,
+22,
+0, 
+
+14,
+21,
+22,
+0, 
+
+10,
+21,
+22,
+0, 
+
+12,
+21,
+22,
+0, 
+
+8,
+30,
+0, 
+
+6,
+30,
+0, 
+
+2,
+30,
+0, 
+
+1,
+30,
+0, 
+
+3,
+30,
+0, 
+
+7,
+30,
+0, 
+
+4,
+30,
+0, 
+
+13,
+21,
+22,
+0, 
+
+15,
+21,
+22,
+0, 
+
+11,
+21,
+22,
+0, 
+
+16,
+21,
+22,
+0, 
+
+14,
+21,
+22,
+0, 
+
+10,
+21,
+22,
+0, 
+
+12,
+21,
+22,
+0, 
+
+6,
+30,
+0, 
+
+2,
+30,
+0, 
+
+1,
+30,
+0, 
+
+7,
+30,
+0, 
+
+4,
+30,
+0, 
+
+11,
+21,
+22,
+0, 
+
+16,
+21,
+22,
+0, 
+
+14,
+21,
+22,
+0, 
+
+10,
+21,
+22,
+0, 
+
+12,
+21,
+22,
+0, 
+
+6,
+30,
+0, 
+
+1,
+30,
+0, 
+
+7,
+30,
+0, 
+
+11,
+21,
+22,
+0, 
+
+10,
+21,
+22,
+0, 
+
+12,
+21,
+22,
+0, 
+
+6,
+30,
+0, 
+
+1,
+30,
+0, 
+
+7,
+30,
+0, 
+
+11,
+21,
+22,
+0, 
+
+6,
+30,
+0, 
+
+7,
+30,
+0, 
+
+11,
+21,
+22,
+0, 
+
+11,
+21,
+22,
+0, 
+
+11,
+21,
+22,
+0, 
+
+11,
+21,
+22,
+0, 
+
+11,
+21,
+22,
+0, 
+0};
+# define YYTYPE unsigned char
+struct yywork { YYTYPE verify, advance; } yycrank[] = {
+0,0,	0,0,	0,0,	0,0,	
+0,0,	0,0,	0,0,	0,0,	
+0,0,	0,0,	1,3,	1,3,	
+0,0,	1,3,	3,3,	3,3,	
+0,0,	3,3,	0,0,	0,0,	
+0,0,	0,0,	0,0,	0,0,	
+0,0,	0,0,	0,0,	0,0,	
+0,0,	0,0,	0,0,	0,0,	
+0,0,	1,3,	1,4,	1,5,	
+0,0,	3,3,	0,0,	0,0,	
+0,0,	0,0,	0,0,	0,0,	
+0,0,	1,6,	0,0,	1,7,	
+1,8,	1,9,	1,9,	1,9,	
+1,9,	1,9,	1,9,	1,9,	
+1,9,	1,9,	1,9,	0,0,	
+0,0,	1,10,	1,11,	0,0,	
+0,0,	0,0,	1,12,	1,12,	
+1,12,	1,12,	1,13,	1,14,	
+1,12,	1,12,	1,15,	1,12,	
+1,12,	1,12,	1,12,	1,12,	
+1,12,	1,16,	1,12,	1,12,	
+1,17,	1,12,	1,12,	1,12,	
+1,18,	1,12,	1,12,	1,12,	
+0,0,	13,36,	14,37,	15,38,	
+1,12,	0,0,	1,12,	1,12,	
+1,12,	1,12,	1,13,	1,14,	
+1,12,	1,12,	1,15,	1,12,	
+1,12,	1,12,	1,12,	1,12,	
+1,12,	1,16,	1,12,	1,12,	
+1,17,	1,12,	1,12,	1,12,	
+1,18,	1,12,	1,12,	1,12,	
+2,19,	13,36,	14,37,	15,38,	
+2,20,	5,5,	0,0,	16,39,	
+0,0,	18,42,	36,54,	2,21,	
+37,55,	5,5,	5,22,	17,40,	
+5,5,	9,9,	9,9,	9,9,	
+9,9,	9,9,	9,9,	9,9,	
+9,9,	9,9,	9,9,	38,56,	
+0,0,	39,57,	40,58,	17,41,	
+2,19,	41,59,	0,0,	42,60,	
+2,20,	0,0,	5,23,	16,39,	
+5,5,	18,42,	36,54,	2,21,	
+37,55,	0,0,	0,0,	17,40,	
+0,0,	0,0,	0,0,	0,0,	
+5,5,	54,69,	0,0,	0,0,	
+0,0,	0,0,	0,0,	38,56,	
+5,5,	39,57,	40,58,	17,41,	
+55,70,	41,59,	5,5,	42,60,	
+56,71,	5,5,	5,5,	5,5,	
+5,5,	5,5,	5,5,	5,5,	
+5,5,	5,5,	5,5,	0,0,	
+5,5,	5,5,	5,5,	5,5,	
+5,5,	54,69,	5,5,	5,5,	
+5,5,	5,5,	5,5,	5,5,	
+5,5,	5,5,	7,24,	0,0,	
+55,70,	0,0,	0,0,	0,0,	
+56,71,	0,0,	7,0,	7,0,	
+0,0,	7,24,	19,43,	19,43,	
+19,43,	19,43,	19,43,	19,43,	
+19,43,	19,43,	19,43,	19,43,	
+21,45,	21,45,	21,45,	21,45,	
+21,45,	21,45,	21,45,	21,45,	
+57,72,	7,0,	0,0,	7,24,	
+0,0,	7,24,	43,43,	43,43,	
+43,43,	43,43,	43,43,	43,43,	
+43,43,	43,43,	43,43,	43,43,	
+0,0,	7,24,	58,73,	0,0,	
+0,0,	0,0,	0,0,	0,0,	
+0,0,	7,24,	0,0,	0,0,	
+59,74,	60,75,	69,83,	7,24,	
+57,72,	70,84,	7,24,	7,25,	
+7,24,	7,24,	7,26,	7,27,	
+7,24,	7,24,	7,28,	7,24,	
+0,0,	7,29,	7,24,	7,24,	
+7,24,	7,30,	58,73,	7,24,	
+7,31,	7,32,	7,24,	7,24,	
+7,24,	7,24,	7,24,	10,10,	
+59,74,	60,75,	69,83,	71,85,	
+72,86,	70,84,	73,87,	10,10,	
+10,33,	74,88,	10,10,	45,45,	
+45,45,	45,45,	45,45,	45,45,	
+45,45,	45,45,	45,45,	75,89,	
+85,95,	86,96,	0,0,	87,97,	
+88,98,	89,99,	95,103,	98,104,	
+0,0,	99,105,	103,109,	0,0,	
+10,10,	0,0,	10,10,	71,85,	
+72,86,	0,0,	73,87,	0,0,	
+0,0,	74,88,	0,0,	0,0,	
+0,0,	0,0,	10,10,	0,0,	
+0,0,	0,0,	0,0,	75,89,	
+85,95,	86,96,	10,10,	87,97,	
+88,98,	89,99,	95,103,	98,104,	
+10,34,	99,105,	103,109,	10,10,	
+10,10,	10,10,	10,10,	10,10,	
+10,10,	10,10,	10,10,	10,10,	
+10,10,	109,112,	10,10,	10,10,	
+10,10,	10,10,	10,10,	12,35,	
+10,10,	10,10,	10,10,	10,10,	
+10,10,	10,10,	10,10,	10,10,	
+0,0,	0,0,	0,0,	12,12,	
+12,12,	12,12,	12,12,	12,12,	
+12,12,	12,12,	12,12,	12,12,	
+12,12,	0,0,	112,113,	113,114,	
+114,115,	109,112,	0,0,	115,116,	
+12,12,	12,12,	12,12,	12,12,	
+12,12,	12,12,	12,12,	12,12,	
+12,12,	12,12,	12,12,	12,12,	
+12,12,	12,12,	12,12,	12,12,	
+12,12,	12,12,	12,12,	12,12,	
+12,12,	12,12,	12,12,	12,12,	
+12,12,	12,12,	112,113,	113,114,	
+114,115,	0,0,	12,12,	115,116,	
+12,12,	12,12,	12,12,	12,12,	
+12,12,	12,12,	12,12,	12,12,	
+12,12,	12,12,	12,12,	12,12,	
+12,12,	12,12,	12,12,	12,12,	
+12,12,	12,12,	12,12,	12,12,	
+12,12,	12,12,	12,12,	12,12,	
+12,12,	12,12,	20,44,	20,44,	
+20,44,	20,44,	20,44,	20,44,	
+20,44,	20,44,	20,44,	20,44,	
+24,0,	24,0,	25,0,	25,0,	
+0,0,	0,0,	0,0,	20,44,	
+20,44,	20,44,	20,44,	20,44,	
+20,44,	0,0,	0,0,	0,0,	
+0,0,	0,0,	0,0,	0,0,	
+0,0,	0,0,	0,0,	24,0,	
+0,0,	25,0,	26,0,	26,0,	
+0,0,	0,0,	0,0,	0,0,	
+0,0,	0,0,	0,0,	0,0,	
+0,0,	0,0,	0,0,	20,44,	
+20,44,	20,44,	20,44,	20,44,	
+20,44,	0,0,	0,0,	27,0,	
+27,0,	26,0,	0,0,	0,0,	
+0,0,	0,0,	0,0,	0,0,	
+0,0,	24,24,	25,46,	25,24,	
+24,24,	24,24,	25,24,	25,24,	
+24,24,	0,0,	25,24,	24,24,	
+0,0,	25,24,	27,0,	24,24,	
+0,0,	25,24,	24,24,	24,24,	
+25,24,	25,24,	0,0,	28,0,	
+28,0,	0,0,	0,0,	26,24,	
+0,0,	0,0,	26,24,	26,24,	
+0,0,	0,0,	26,24,	0,0,	
+0,0,	26,24,	0,0,	26,47,	
+0,0,	26,24,	0,0,	0,0,	
+26,24,	26,24,	28,0,	27,48,	
+27,24,	29,0,	29,0,	27,24,	
+27,24,	0,0,	0,0,	27,24,	
+0,0,	0,0,	27,24,	0,0,	
+0,0,	0,0,	27,24,	0,0,	
+0,0,	27,24,	27,24,	0,0,	
+0,0,	30,0,	30,0,	0,0,	
+29,0,	0,0,	0,0,	0,0,	
+0,0,	0,0,	31,0,	31,0,	
+28,24,	0,0,	28,49,	28,24,	
+28,24,	0,0,	0,0,	28,24,	
+0,0,	0,0,	28,24,	0,0,	
+30,0,	0,0,	28,24,	0,0,	
+0,0,	28,24,	28,24,	32,0,	
+32,0,	31,0,	0,0,	0,0,	
+0,0,	0,0,	29,24,	0,0,	
+0,0,	29,24,	29,24,	0,0,	
+0,0,	29,50,	0,0,	0,0,	
+29,24,	0,0,	0,0,	0,0,	
+29,24,	0,0,	32,0,	29,24,	
+29,24,	30,51,	30,24,	0,0,	
+0,0,	30,24,	30,24,	0,0,	
+0,0,	30,24,	0,0,	31,24,	
+30,24,	0,0,	31,52,	31,24,	
+30,24,	0,0,	31,24,	30,24,	
+30,24,	31,24,	0,0,	0,0,	
+0,0,	31,24,	0,0,	0,0,	
+31,24,	31,24,	0,0,	0,0,	
+32,24,	0,0,	0,0,	32,24,	
+32,24,	0,0,	0,0,	32,53,	
+0,0,	0,0,	32,24,	0,0,	
+0,0,	0,0,	32,24,	0,0,	
+0,0,	32,24,	32,24,	35,35,	
+35,35,	35,35,	35,35,	35,35,	
+35,35,	35,35,	35,35,	35,35,	
+35,35,	0,0,	0,0,	0,0,	
+0,0,	0,0,	0,0,	0,0,	
+35,35,	35,35,	35,35,	35,35,	
+35,35,	35,35,	35,35,	35,35,	
+35,35,	35,35,	35,35,	35,35,	
+35,35,	35,35,	35,35,	35,35,	
+35,35,	35,35,	35,35,	35,35,	
+35,35,	35,35,	35,35,	35,35,	
+35,35,	35,35,	0,0,	0,0,	
+0,0,	0,0,	35,35,	0,0,	
+35,35,	35,35,	35,35,	35,35,	
+35,35,	35,35,	35,35,	35,35,	
+35,35,	35,35,	35,35,	35,35,	
+35,35,	35,35,	35,35,	35,35,	
+35,35,	35,35,	35,35,	35,35,	
+35,35,	35,35,	35,35,	35,35,	
+35,35,	35,35,	44,44,	44,44,	
+44,44,	44,44,	44,44,	44,44,	
+44,44,	44,44,	44,44,	44,44,	
+46,0,	46,0,	0,0,	0,0,	
+0,0,	48,0,	48,0,	44,44,	
+44,44,	44,44,	44,44,	44,44,	
+44,44,	0,0,	0,0,	0,0,	
+0,0,	0,0,	0,0,	0,0,	
+0,0,	0,0,	0,0,	46,0,	
+47,0,	47,0,	0,0,	0,0,	
+48,0,	49,0,	49,0,	0,0,	
+0,0,	0,0,	0,0,	0,0,	
+0,0,	0,0,	0,0,	44,44,	
+44,44,	44,44,	44,44,	44,44,	
+44,44,	50,0,	50,0,	47,0,	
+0,0,	0,0,	0,0,	0,0,	
+49,0,	0,0,	52,0,	52,0,	
+0,0,	46,24,	0,0,	0,0,	
+46,24,	46,24,	48,24,	48,63,	
+46,24,	48,24,	48,24,	46,24,	
+50,0,	48,24,	0,0,	46,24,	
+48,24,	0,0,	46,61,	46,24,	
+48,24,	52,0,	0,0,	48,24,	
+48,24,	47,24,	0,0,	47,62,	
+47,24,	47,24,	49,24,	0,0,	
+47,24,	49,64,	49,24,	47,24,	
+0,0,	49,24,	0,0,	47,24,	
+49,24,	0,0,	47,24,	47,24,	
+49,24,	0,0,	50,24,	49,24,	
+49,24,	50,24,	50,24,	51,0,	
+51,0,	50,24,	0,0,	52,24,	
+50,24,	0,0,	52,24,	52,24,	
+50,24,	0,0,	52,24,	50,24,	
+50,65,	52,24,	0,0,	53,0,	
+53,0,	52,24,	0,0,	0,0,	
+52,24,	52,24,	51,0,	52,67,	
+61,0,	61,0,	0,0,	0,0,	
+0,0,	0,0,	0,0,	0,0,	
+0,0,	0,0,	0,0,	0,0,	
+0,0,	0,0,	53,0,	0,0,	
+0,0,	0,0,	0,0,	0,0,	
+62,0,	62,0,	0,0,	61,0,	
+0,0,	0,0,	0,0,	0,0,	
+0,0,	0,0,	0,0,	0,0,	
+51,24,	0,0,	0,0,	51,24,	
+51,24,	51,66,	0,0,	51,24,	
+63,0,	63,0,	51,24,	62,0,	
+0,0,	0,0,	51,24,	0,0,	
+53,24,	51,24,	51,24,	53,24,	
+53,24,	0,0,	0,0,	53,24,	
+0,0,	61,24,	53,24,	0,0,	
+61,76,	61,24,	53,24,	63,0,	
+61,24,	53,24,	53,68,	61,24,	
+0,0,	64,0,	64,0,	61,24,	
+0,0,	0,0,	61,24,	61,24,	
+0,0,	62,24,	0,0,	0,0,	
+62,24,	62,24,	0,0,	0,0,	
+62,24,	65,0,	65,0,	62,24,	
+0,0,	0,0,	0,0,	62,24,	
+64,0,	0,0,	62,24,	62,24,	
+0,0,	63,24,	0,0,	0,0,	
+63,24,	63,24,	0,0,	0,0,	
+63,77,	66,0,	66,0,	63,24,	
+65,0,	0,0,	0,0,	63,24,	
+0,0,	0,0,	63,24,	63,24,	
+0,0,	0,0,	0,0,	0,0,	
+0,0,	0,0,	0,0,	0,0,	
+67,0,	67,0,	64,24,	0,0,	
+66,0,	64,24,	64,24,	0,0,	
+0,0,	64,24,	0,0,	0,0,	
+64,24,	0,0,	64,78,	0,0,	
+64,24,	0,0,	65,24,	64,24,	
+64,24,	65,79,	65,24,	67,0,	
+0,0,	65,24,	68,0,	68,0,	
+65,24,	0,0,	0,0,	0,0,	
+65,24,	0,0,	0,0,	65,24,	
+65,24,	0,0,	66,24,	0,0,	
+0,0,	66,80,	66,24,	0,0,	
+0,0,	66,24,	76,0,	76,0,	
+66,24,	68,0,	0,0,	0,0,	
+66,24,	0,0,	0,0,	66,24,	
+66,24,	67,24,	77,0,	77,0,	
+67,81,	67,24,	0,0,	0,0,	
+67,24,	0,0,	0,0,	67,24,	
+0,0,	76,0,	0,0,	67,24,	
+0,0,	0,0,	67,24,	67,24,	
+0,0,	0,0,	0,0,	78,0,	
+78,0,	77,0,	0,0,	68,24,	
+0,0,	0,0,	68,24,	68,24,	
+79,0,	79,0,	68,24,	0,0,	
+0,0,	68,82,	0,0,	0,0,	
+0,0,	68,24,	0,0,	0,0,	
+68,24,	68,24,	78,0,	76,24,	
+0,0,	0,0,	76,24,	76,24,	
+80,0,	80,0,	76,24,	79,0,	
+0,0,	76,24,	0,0,	77,24,	
+0,0,	76,24,	77,24,	77,24,	
+76,24,	76,24,	77,24,	0,0,	
+0,0,	77,90,	0,0,	0,0,	
+0,0,	77,24,	0,0,	80,0,	
+77,24,	77,24,	81,0,	81,0,	
+78,24,	0,0,	0,0,	78,24,	
+78,24,	0,0,	0,0,	78,24,	
+0,0,	79,24,	78,24,	0,0,	
+79,24,	79,24,	78,24,	0,0,	
+79,24,	78,24,	78,91,	79,24,	
+0,0,	81,0,	0,0,	79,24,	
+0,0,	79,92,	79,24,	79,24,	
+0,0,	80,24,	82,0,	82,0,	
+80,24,	80,24,	0,0,	0,0,	
+80,24,	0,0,	0,0,	80,24,	
+0,0,	0,0,	0,0,	80,24,	
+0,0,	0,0,	80,24,	80,24,	
+0,0,	0,0,	0,0,	90,0,	
+90,0,	82,0,	0,0,	81,24,	
+91,0,	91,0,	81,24,	81,24,	
+0,0,	0,0,	81,24,	0,0,	
+0,0,	81,24,	0,0,	0,0,	
+0,0,	81,24,	0,0,	81,93,	
+81,24,	81,24,	90,0,	0,0,	
+92,0,	92,0,	0,0,	91,0,	
+0,0,	0,0,	0,0,	0,0,	
+0,0,	0,0,	0,0,	82,24,	
+0,0,	0,0,	82,94,	82,24,	
+0,0,	0,0,	82,24,	0,0,	
+0,0,	82,24,	0,0,	92,0,	
+0,0,	82,24,	0,0,	0,0,	
+82,24,	82,24,	93,0,	93,0,	
+90,24,	0,0,	0,0,	90,24,	
+90,24,	91,24,	0,0,	90,100,	
+91,24,	91,24,	90,24,	0,0,	
+91,24,	0,0,	90,24,	91,24,	
+0,0,	90,24,	90,24,	91,24,	
+0,0,	93,0,	91,24,	91,24,	
+92,101,	92,24,	94,0,	94,0,	
+92,24,	92,24,	0,0,	0,0,	
+92,24,	0,0,	0,0,	92,24,	
+0,0,	0,0,	0,0,	92,24,	
+0,0,	0,0,	92,24,	92,24,	
+0,0,	100,0,	100,0,	101,0,	
+101,0,	94,0,	0,0,	0,0,	
+0,0,	0,0,	0,0,	93,24,	
+0,0,	0,0,	93,24,	93,24,	
+0,0,	0,0,	93,102,	0,0,	
+0,0,	93,24,	102,0,	102,0,	
+100,0,	93,24,	101,0,	0,0,	
+93,24,	93,24,	0,0,	106,0,	
+106,0,	0,0,	0,0,	0,0,	
+0,0,	0,0,	0,0,	94,24,	
+0,0,	0,0,	94,24,	94,24,	
+0,0,	102,0,	94,24,	0,0,	
+0,0,	94,24,	0,0,	0,0,	
+0,0,	94,24,	106,0,	0,0,	
+94,24,	94,24,	100,24,	0,0,	
+101,24,	100,24,	100,24,	101,24,	
+101,24,	100,24,	0,0,	101,24,	
+100,24,	0,0,	101,107,	0,0,	
+100,24,	0,0,	101,24,	100,24,	
+100,106,	101,24,	101,24,	102,24,	
+107,0,	107,0,	102,24,	102,24,	
+0,0,	0,0,	102,24,	0,0,	
+106,24,	102,24,	0,0,	106,24,	
+106,24,	102,24,	0,0,	106,24,	
+102,24,	102,108,	106,24,	108,0,	
+108,0,	0,0,	106,24,	107,0,	
+0,0,	106,24,	106,24,	0,0,	
+0,0,	0,0,	0,0,	106,110,	
+0,0,	0,0,	0,0,	0,0,	
+0,0,	0,0,	0,0,	0,0,	
+110,0,	110,0,	108,0,	0,0,	
+0,0,	111,0,	111,0,	0,0,	
+0,0,	0,0,	0,0,	0,0,	
+0,0,	0,0,	0,0,	0,0,	
+0,0,	107,24,	0,0,	0,0,	
+107,24,	107,24,	0,0,	110,0,	
+107,24,	0,0,	0,0,	107,24,	
+111,0,	0,0,	0,0,	107,24,	
+0,0,	0,0,	107,24,	107,24,	
+108,24,	0,0,	0,0,	108,24,	
+108,24,	0,0,	0,0,	108,24,	
+0,0,	0,0,	108,24,	0,0,	
+0,0,	0,0,	108,24,	0,0,	
+0,0,	108,24,	108,24,	0,0,	
+0,0,	110,24,	0,0,	108,111,	
+110,24,	110,24,	111,24,	0,0,	
+110,24,	111,24,	111,24,	110,24,	
+0,0,	111,24,	0,0,	110,24,	
+111,24,	0,0,	110,24,	110,24,	
+111,24,	0,0,	0,0,	111,24,	
+111,24,	0,0,	0,0,	0,0,	
+0,0};
+struct yysvf yysvec[] = {
+0,	0,	0,
+yycrank+1,	0,		0,	
+yycrank+56,	yysvec+1,	0,	
+yycrank+5,	0,		yyvstop+1,
+yycrank+0,	0,		yyvstop+3,
+yycrank+-128,	0,		0,	
+yycrank+0,	0,		yyvstop+5,
+yycrank+-217,	0,		yyvstop+7,
+yycrank+0,	0,		yyvstop+9,
+yycrank+93,	0,		yyvstop+11,
+yycrank+-306,	0,		0,	
+yycrank+0,	0,		yyvstop+13,
+yycrank+351,	0,		yyvstop+15,
+yycrank+11,	yysvec+12,	yyvstop+18,
+yycrank+29,	yysvec+12,	yyvstop+21,
+yycrank+17,	yysvec+12,	yyvstop+24,
+yycrank+49,	yysvec+12,	yyvstop+27,
+yycrank+70,	yysvec+12,	yyvstop+30,
+yycrank+68,	yysvec+12,	yyvstop+33,
+yycrank+182,	yysvec+12,	yyvstop+36,
+yycrank+426,	yysvec+12,	yyvstop+39,
+yycrank+192,	yysvec+12,	yyvstop+42,
+yycrank+0,	0,		yyvstop+45,
+yycrank+0,	0,		yyvstop+47,
+yycrank+-475,	yysvec+7,	yyvstop+49,
+yycrank+-477,	yysvec+7,	yyvstop+51,
+yycrank+-501,	yysvec+7,	yyvstop+53,
+yycrank+-522,	yysvec+7,	yyvstop+55,
+yycrank+-554,	yysvec+7,	yyvstop+57,
+yycrank+-580,	yysvec+7,	yyvstop+59,
+yycrank+-600,	yysvec+7,	yyvstop+61,
+yycrank+-609,	yysvec+7,	yyvstop+63,
+yycrank+-630,	yysvec+7,	yyvstop+65,
+yycrank+0,	0,		yyvstop+67,
+yycrank+0,	0,		yyvstop+69,
+yycrank+667,	yysvec+12,	yyvstop+71,
+yycrank+52,	yysvec+12,	yyvstop+73,
+yycrank+52,	yysvec+12,	yyvstop+76,
+yycrank+81,	yysvec+12,	yyvstop+79,
+yycrank+84,	yysvec+12,	yyvstop+82,
+yycrank+68,	yysvec+12,	yyvstop+85,
+yycrank+90,	yysvec+12,	yyvstop+88,
+yycrank+77,	yysvec+12,	yyvstop+91,
+yycrank+206,	yysvec+12,	yyvstop+94,
+yycrank+742,	yysvec+12,	yyvstop+98,
+yycrank+271,	yysvec+12,	yyvstop+102,
+yycrank+-791,	yysvec+7,	yyvstop+106,
+yycrank+-815,	yysvec+7,	yyvstop+108,
+yycrank+-796,	yysvec+7,	yyvstop+110,
+yycrank+-820,	yysvec+7,	yyvstop+112,
+yycrank+-836,	yysvec+7,	yyvstop+114,
+yycrank+-898,	yysvec+7,	yyvstop+116,
+yycrank+-845,	yysvec+7,	yyvstop+118,
+yycrank+-914,	yysvec+7,	yyvstop+120,
+yycrank+98,	yysvec+12,	yyvstop+122,
+yycrank+123,	yysvec+12,	yyvstop+125,
+yycrank+113,	yysvec+12,	yyvstop+128,
+yycrank+178,	yysvec+12,	yyvstop+131,
+yycrank+197,	yysvec+12,	yyvstop+134,
+yycrank+209,	yysvec+12,	yyvstop+137,
+yycrank+199,	yysvec+12,	yyvstop+140,
+yycrank+-923,	yysvec+7,	yyvstop+143,
+yycrank+-943,	yysvec+7,	yyvstop+145,
+yycrank+-963,	yysvec+7,	yyvstop+148,
+yycrank+-992,	yysvec+7,	yyvstop+150,
+yycrank+-1008,	yysvec+7,	yyvstop+152,
+yycrank+-1028,	yysvec+7,	yyvstop+154,
+yycrank+-1047,	yysvec+7,	yyvstop+156,
+yycrank+-1073,	yysvec+7,	yyvstop+158,
+yycrank+196,	yysvec+12,	yyvstop+160,
+yycrank+205,	yysvec+12,	yyvstop+164,
+yycrank+229,	yysvec+12,	yyvstop+168,
+yycrank+239,	yysvec+12,	yyvstop+172,
+yycrank+232,	yysvec+12,	yyvstop+176,
+yycrank+248,	yysvec+12,	yyvstop+180,
+yycrank+254,	yysvec+12,	yyvstop+184,
+yycrank+-1093,	yysvec+7,	yyvstop+188,
+yycrank+-1105,	yysvec+7,	yyvstop+191,
+yycrank+-1126,	yysvec+7,	yyvstop+194,
+yycrank+-1135,	yysvec+7,	yyvstop+197,
+yycrank+-1155,	yysvec+7,	yyvstop+200,
+yycrank+-1181,	yysvec+7,	yyvstop+203,
+yycrank+-1213,	yysvec+7,	yyvstop+206,
+yycrank+0,	yysvec+12,	yyvstop+209,
+yycrank+0,	yysvec+12,	yyvstop+213,
+yycrank+251,	yysvec+12,	yyvstop+217,
+yycrank+241,	yysvec+12,	yyvstop+221,
+yycrank+262,	yysvec+12,	yyvstop+225,
+yycrank+249,	yysvec+12,	yyvstop+229,
+yycrank+255,	yysvec+12,	yyvstop+233,
+yycrank+-1234,	yysvec+7,	yyvstop+237,
+yycrank+-1239,	yysvec+7,	yyvstop+240,
+yycrank+-1259,	yysvec+7,	yyvstop+243,
+yycrank+-1289,	yysvec+7,	yyvstop+246,
+yycrank+-1317,	yysvec+7,	yyvstop+249,
+yycrank+269,	yysvec+12,	yyvstop+252,
+yycrank+0,	yysvec+12,	yyvstop+256,
+yycrank+0,	yysvec+12,	yyvstop+260,
+yycrank+252,	yysvec+12,	yyvstop+264,
+yycrank+266,	yysvec+12,	yyvstop+268,
+yycrank+-1336,	yysvec+7,	yyvstop+272,
+yycrank+-1338,	yysvec+7,	yyvstop+275,
+yycrank+-1357,	yysvec+7,	yyvstop+278,
+yycrank+254,	yysvec+12,	yyvstop+281,
+yycrank+0,	yysvec+12,	yyvstop+285,
+yycrank+0,	yysvec+12,	yyvstop+289,
+yycrank+-1366,	yysvec+7,	yyvstop+293,
+yycrank+-1415,	yysvec+7,	yyvstop+296,
+yycrank+-1434,	yysvec+7,	yyvstop+299,
+yycrank+308,	yysvec+12,	yyvstop+302,
+yycrank+-1455,	yysvec+7,	yyvstop+306,
+yycrank+-1460,	yysvec+7,	yyvstop+309,
+yycrank+331,	yysvec+12,	yyvstop+312,
+yycrank+333,	yysvec+12,	yyvstop+316,
+yycrank+347,	yysvec+12,	yyvstop+320,
+yycrank+339,	yysvec+12,	yyvstop+324,
+yycrank+0,	yysvec+12,	yyvstop+328,
+0,	0,	0};
+struct yywork *yytop = yycrank+1544;
+struct yysvf *yybgin = yysvec+1;
+char yymatch[] = {
+  0,   1,   1,   1,   1,   1,   1,   1, 
+  1,   9,  10,   1,  12,   1,   1,   1, 
+  1,   1,   1,   1,   1,   1,   1,   1, 
+  1,   1,   1,   1,   1,   1,   1,   1, 
+  9,   1,  34,   1,  36,   1,   1,   1, 
+  1,   1,   1,   1,   1,   1,   1,   1, 
+ 48,  48,  48,  48,  48,  48,  48,  48, 
+ 56,  56,   1,   1,   1,   1,  62,   1, 
+  1,  65,  66,  67,  68,  69,  70,  71, 
+ 72,  73,  74,  74,  76,  77,  78,  79, 
+ 80,  74,  82,  83,  84,  85,  86,  87, 
+ 88,  89,  74,   1,   1,   1,   1,  74, 
+  1,  65,  66,  67,  68,  69,  70,  71, 
+ 72,  73,  74,  74,  76,  77,  78,  79, 
+ 80,  74,  82,  83,  84,  85,  86,  87, 
+ 88,  89,  74,   1,   1,   1,   1,   1, 
+  1,   1,   1,   1,   1,   1,   1,   1, 
+  1,   1,   1,   1,   1,   1,   1,   1, 
+  1,   1,   1,   1,   1,   1,   1,   1, 
+  1,   1,   1,   1,   1,   1,   1,   1, 
+  1,   1,   1,   1,   1,   1,   1,   1, 
+  1,   1,   1,   1,   1,   1,   1,   1, 
+  1,   1,   1,   1,   1,   1,   1,   1, 
+  1,   1,   1,   1,   1,   1,   1,   1, 
+  1,   1,   1,   1,   1,   1,   1,   1, 
+  1,   1,   1,   1,   1,   1,   1,   1, 
+  1,   1,   1,   1,   1,   1,   1,   1, 
+  1,   1,   1,   1,   1,   1,   1,   1, 
+  1,   1,   1,   1,   1,   1,   1,   1, 
+  1,   1,   1,   1,   1,   1,   1,   1, 
+  1,   1,   1,   1,   1,   1,   1,   1, 
+  1,   1,   1,   1,   1,   1,   1,   1, 
+0};
+char yyextra[] = {
+0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,
+0};
+/*	Copyright (c) 1989 AT&T	*/
+/*	  All Rights Reserved  	*/
+
+/*	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T	*/
+/*	The copyright notice above does not evidence any   	*/
+/*	actual or intended publication of such source code.	*/
+
+#pragma ident	"@(#)ncform	6.11	97/01/06 SMI"
+
+int yylineno =1;
+# define YYU(x) x
+# define NLSTATE yyprevious=YYNEWLINE
+struct yysvf *yylstate [YYLMAX], **yylsp, **yyolsp;
+char yysbuf[YYLMAX];
+char *yysptr = yysbuf;
+int *yyfnd;
+extern struct yysvf *yyestate;
+int yyprevious = YYNEWLINE;
+#if defined(__cplusplus) || defined(__STDC__)
+int yylook(void)
+#else
+yylook()
+#endif
+{
+	register struct yysvf *yystate, **lsp;
+	register struct yywork *yyt;
+	struct yysvf *yyz;
+	int yych, yyfirst;
+	struct yywork *yyr;
+# ifdef LEXDEBUG
+	int debug;
+# endif
+	char *yylastch;
+	/* start off machines */
+# ifdef LEXDEBUG
+	debug = 0;
+# endif
+	yyfirst=1;
+	if (!yymorfg)
+		yylastch = yytext;
+	else {
+		yymorfg=0;
+		yylastch = yytext+yyleng;
+		}
+	for(;;){
+		lsp = yylstate;
+		yyestate = yystate = yybgin;
+		if (yyprevious==YYNEWLINE) yystate++;
+		for (;;){
+# ifdef LEXDEBUG
+			if(debug)fprintf(yyout,"state %d\n",yystate-yysvec-1);
+# endif
+			yyt = yystate->yystoff;
+			if(yyt == yycrank && !yyfirst){  /* may not be any transitions */
+				yyz = yystate->yyother;
+				if(yyz == 0)break;
+				if(yyz->yystoff == yycrank)break;
+				}
+#ifndef __cplusplus
+			*yylastch++ = yych = input();
+#else
+			*yylastch++ = yych = lex_input();
+#endif
+#ifdef YYISARRAY
+			if(yylastch > &yytext[YYLMAX]) {
+				fprintf(yyout,"Input string too long, limit %d\n",YYLMAX);
+				exit(1);
+			}
+#else
+			if (yylastch >= &yytext[ yytextsz ]) {
+				int	x = yylastch - yytext;
+
+				yytextsz += YYTEXTSZINC;
+				if (yytext == yy_tbuf) {
+				    yytext = (char *) malloc(yytextsz);
+				    memcpy(yytext, yy_tbuf, sizeof (yy_tbuf));
+				}
+				else
+				    yytext = (char *) realloc(yytext, yytextsz);
+				if (!yytext) {
+				    fprintf(yyout,
+					"Cannot realloc yytext\n");
+				    exit(1);
+				}
+				yylastch = yytext + x;
+			}
+#endif
+			yyfirst=0;
+		tryagain:
+# ifdef LEXDEBUG
+			if(debug){
+				fprintf(yyout,"char ");
+				allprint(yych);
+				putchar('\n');
+				}
+# endif
+			yyr = yyt;
+			if ( (int)yyt > (int)yycrank){
+				yyt = yyr + yych;
+				if (yyt <= yytop && yyt->verify+yysvec == yystate){
+					if(yyt->advance+yysvec == YYLERR)	/* error transitions */
+						{unput(*--yylastch);break;}
+					*lsp++ = yystate = yyt->advance+yysvec;
+					if(lsp > &yylstate[YYLMAX]) {
+						fprintf(yyout,"Input string too long, limit %d\n",YYLMAX);
+						exit(1);
+					}
+					goto contin;
+					}
+				}
+# ifdef YYOPTIM
+			else if((int)yyt < (int)yycrank) {		/* r < yycrank */
+				yyt = yyr = yycrank+(yycrank-yyt);
+# ifdef LEXDEBUG
+				if(debug)fprintf(yyout,"compressed state\n");
+# endif
+				yyt = yyt + yych;
+				if(yyt <= yytop && yyt->verify+yysvec == yystate){
+					if(yyt->advance+yysvec == YYLERR)	/* error transitions */
+						{unput(*--yylastch);break;}
+					*lsp++ = yystate = yyt->advance+yysvec;
+					if(lsp > &yylstate[YYLMAX]) {
+						fprintf(yyout,"Input string too long, limit %d\n",YYLMAX);
+						exit(1);
+					}
+					goto contin;
+					}
+				yyt = yyr + YYU(yymatch[yych]);
+# ifdef LEXDEBUG
+				if(debug){
+					fprintf(yyout,"try fall back character ");
+					allprint(YYU(yymatch[yych]));
+					putchar('\n');
+					}
+# endif
+				if(yyt <= yytop && yyt->verify+yysvec == yystate){
+					if(yyt->advance+yysvec == YYLERR)	/* error transition */
+						{unput(*--yylastch);break;}
+					*lsp++ = yystate = yyt->advance+yysvec;
+					if(lsp > &yylstate[YYLMAX]) {
+						fprintf(yyout,"Input string too long, limit %d\n",YYLMAX);
+						exit(1);
+					}
+					goto contin;
+					}
+				}
+			if ((yystate = yystate->yyother) && (yyt= yystate->yystoff) != yycrank){
+# ifdef LEXDEBUG
+				if(debug)fprintf(yyout,"fall back to state %d\n",yystate-yysvec-1);
+# endif
+				goto tryagain;
+				}
+# endif
+			else
+				{unput(*--yylastch);break;}
+		contin:
+# ifdef LEXDEBUG
+			if(debug){
+				fprintf(yyout,"state %d char ",yystate-yysvec-1);
+				allprint(yych);
+				putchar('\n');
+				}
+# endif
+			;
+			}
+# ifdef LEXDEBUG
+		if(debug){
+			fprintf(yyout,"stopped at %d with ",*(lsp-1)-yysvec-1);
+			allprint(yych);
+			putchar('\n');
+			}
+# endif
+		while (lsp-- > yylstate){
+			*yylastch-- = 0;
+			if (*lsp != 0 && (yyfnd= (*lsp)->yystops) && *yyfnd > 0){
+				yyolsp = lsp;
+				if(yyextra[*yyfnd]){		/* must backup */
+					while(yyback((*lsp)->yystops,-*yyfnd) != 1 && lsp > yylstate){
+						lsp--;
+						unput(*yylastch--);
+						}
+					}
+				yyprevious = YYU(*yylastch);
+				yylsp = lsp;
+				yyleng = yylastch-yytext+1;
+				yytext[yyleng] = 0;
+# ifdef LEXDEBUG
+				if(debug){
+					fprintf(yyout,"\nmatch ");
+					sprint(yytext);
+					fprintf(yyout," action %d\n",*yyfnd);
+					}
+# endif
+				return(*yyfnd++);
+				}
+			unput(*yylastch);
+			}
+		if (yytext[0] == 0  /* && feof(yyin) */)
+			{
+			yysptr=yysbuf;
+			return(0);
+			}
+#ifndef __cplusplus
+		yyprevious = yytext[0] = input();
+		if (yyprevious>0)
+			output(yyprevious);
+#else
+		yyprevious = yytext[0] = lex_input();
+		if (yyprevious>0)
+			lex_output(yyprevious);
+#endif
+		yylastch=yytext;
+# ifdef LEXDEBUG
+		if(debug)putchar('\n');
+# endif
+		}
+	}
+#if defined(__cplusplus) || defined(__STDC__)
+int yyback(int *p, int m)
+#else
+yyback(p, m)
+	int *p;
+#endif
+{
+	if (p==0) return(0);
+	while (*p) {
+		if (*p++ == m)
+			return(1);
+	}
+	return(0);
+}
+	/* the following are only used in the lex library */
+#if defined(__cplusplus) || defined(__STDC__)
+int yyinput(void)
+#else
+yyinput()
+#endif
+{
+#ifndef __cplusplus
+	return(input());
+#else
+	return(lex_input());
+#endif
+	}
+#if defined(__cplusplus) || defined(__STDC__)
+void yyoutput(int c)
+#else
+yyoutput(c)
+  int c; 
+#endif
+{
+#ifndef __cplusplus
+	output(c);
+#else
+	lex_output(c);
+#endif
+	}
+#if defined(__cplusplus) || defined(__STDC__)
+void yyunput(int c)
+#else
+yyunput(c)
+   int c; 
+#endif
+{
+	unput(c);
+	}
diff --git a/messlexer.l b/messlexer.l
index b355fcd..022f72b 100644
--- a/messlexer.l
+++ b/messlexer.l
@@ -15,10 +15,11 @@
  *      27-Aug-1992 - TJF - Original version.
  *      14-Apr-1994 - TJF - Support __VMS macro
  *      13-Aug-1997 - TJF - Add yywrap under WIN32
+ *      14-Mar-2003 - TJF - Add yywrap under MacOsX.
  */
 #include "messgen.h"
 #include "messparser.h"
-#if defined(VMS) || defined(__VMS) || defined(WIN32) || defined(__linux__)
+#if defined(VMS) || defined(__VMS) || defined(WIN32) || defined(__linux__) || defined(__APPLE__)
 int yywrap() { return(1); }
 #endif
 
@@ -41,10 +42,16 @@ static void makeString(LexStringType *string);
 #   define ECHO
 #endif
 /* 
- * Our own input routine, 
+ * Our own input routine.  Use YYINPUT for flex, which also required that we 
+ & declare yylineno.
  */
-#undef input
-#define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):L__getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)
+#ifdef input
+#    undef input
+#    define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):L__getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)
+#else
+     int yylineno;
+#    define YYINPUT() (((yytchar=yysptr>yysbuf?U(*--yysptr):L__getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)
+#endif
 /*
  *  The COMRET implements a common return sequence of setting yylval to the line
  *   number and returning a token name.
-- 
GitLab