/* THIS FILE HAS BEEN AUTOMATICALLY GENERATED BY LLnextgen. DO NOT EDIT */
#define LL_NTERMINALS 13
#define LL_NSETS 2
#define LL_SSETS 4
#define LLinset(LLx) (LLsets[LLx*LL_SSETS + (LLcsymb/8)] & (1<<(LLcsymb & 7)))
#define LL_SCANDONE(LLx) if (LLsymb != LLx) LLerror(LLx);
static int LLscnt[LL_NSETS+1], LLtcnt[LL_NTERMINALS];
static int LLcsymb;
#include <string.h>
static const char LLsets[] = {
	'\xFE', 	'\x0C', 	'\x00', 	'\x00', 
	'\x00', 	'\x13', 	'\x00', 	'\x00', 
	0
};
static const int LLindex[] = { 0,
	   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,   -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,   12,   -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,   -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,    1,    2,    3,    4,    5,    6,    7,
	   8,    9,   10,   11};
int LLsymb;
static int LLreissue;
int yylex(void);
static int LLlexerWrapper(void) {
	if (LLreissue == -2 /* LL_NEW_TOKEN */) {
		return yylex();
	} else {
		int LLretval = LLreissue;
		LLreissue = -2 /* LL_NEW_TOKEN */;
		return LLretval;
	}
}
void LLmessage(int);
static void LLread(void) { LLcsymb = LLindex[(LLsymb = LLlexerWrapper()) + 1]; }
static int LLskip(void) {
	int LL_i;
	if (LLcsymb >= 0) {
		if (LLtcnt[LLcsymb] != 0) return 0;
		for (LL_i = 0; LL_i < LL_NSETS; LL_i++)
			if (LLscnt[LL_i] != 0 && LLinset(LL_i))
				return 0;
	}

	for (;;) {
		LLmessage(0 /* LL_DELETE */);
		while ((LLcsymb = LLindex[(LLsymb = LLlexerWrapper()) + 1]) < 0) LLmessage(0 /* LL_DELETE */);
		if (LLtcnt[LLcsymb] != 0)
			return 1;
		for (LL_i = 0; LL_i < LL_NSETS; LL_i++)
			if (LLscnt[LL_i] != 0 && LLinset(LL_i))
				return 1;
	}
}
static void LLerror(int LLtoken) {
	if (LLtoken == 256 /* EOFILE */) {
		LLmessage(-1 /* LL_MISSINGEOF */);
		while (LLindex[(LLsymb = LLlexerWrapper()) + 1] != 0) /*NOTHING*/ ;
		return;
	}
	LLtcnt[LLindex[LLtoken + 1]]++;
	LLskip();
	LLtcnt[LLindex[LLtoken + 1]]--;
	if (LLsymb != LLtoken) { LLreissue = LLsymb; LLmessage(LLtoken); }
}
static const char *LLsymbolTable[] = {
"<EOF>", 
"<EOF>", "<SOH>", "<STX>", "<ETX>", 
"<EOT>", "<ENQ>", "<ACK>", "<BEL>", 
"<BS>", "<TAB>", "<NL>", "<VT>", 
"<FF>", "<CR>", "<SO>", "<SI>", 
"<DLE>", "<DC1>", "<DC2>", "<DC3>", 
"<DC4>", "<NAK>", "<SYN>", "<ETB>", 
"<CAN>", "<EM>", "<SUB>", "<ESC>", 
"<FS>", "<GS>", "<RS>", "<US>", 
"<SP>", "'!'", "'\"'", "'#'", 
"'$'", "'%'", "'&'", "'\''", 
"'('", "')'", "'*'", "'+'", 
"','", "'-'", "'.'", "'/'", 
"'0'", "'1'", "'2'", "'3'", 
"'4'", "'5'", "'6'", "'7'", 
"'8'", "'9'", "':'", "';'", 
"'<'", "'='", "'>'", "'?'", 
"'@'", "'A'", "'B'", "'C'", 
"'D'", "'E'", "'F'", "'G'", 
"'H'", "'I'", "'J'", "'K'", 
"'L'", "'M'", "'N'", "'O'", 
"'P'", "'Q'", "'R'", "'S'", 
"'T'", "'U'", "'V'", "'W'", 
"'X'", "'Y'", "'Z'", "'['", 
"'\\'", "']'", "'^'", "'_'", 
"'`'", "'a'", "'b'", "'c'", 
"'d'", "'e'", "'f'", "'g'", 
"'h'", "'i'", "'j'", "'k'", 
"'l'", "'m'", "'n'", "'o'", 
"'p'", "'q'", "'r'", "'s'", 
"'t'", "'u'", "'v'", "'w'", 
"'x'", "'y'", "'z'", "'{'", 
"'|'", "'}'", "'~'", "<DEL>", 
"'\x80'", "'\x81'", "'\x82'", "'\x83'", 
"'\x84'", "'\x85'", "'\x86'", "'\x87'", 
"'\x88'", "'\x89'", "'\x8A'", "'\x8B'", 
"'\x8C'", "'\x8D'", "'\x8E'", "'\x8F'", 
"'\x90'", "'\x91'", "'\x92'", "'\x93'", 
"'\x94'", "'\x95'", "'\x96'", "'\x97'", 
"'\x98'", "'\x99'", "'\x9A'", "'\x9B'", 
"'\x9C'", "'\x9D'", "'\x9E'", "'\x9F'", 
"'\xA0'", "'\xA1'", "'\xA2'", "'\xA3'", 
"'\xA4'", "'\xA5'", "'\xA6'", "'\xA7'", 
"'\xA8'", "'\xA9'", "'\xAA'", "'\xAB'", 
"'\xAC'", "'\xAD'", "'\xAE'", "'\xAF'", 
"'\xB0'", "'\xB1'", "'\xB2'", "'\xB3'", 
"'\xB4'", "'\xB5'", "'\xB6'", "'\xB7'", 
"'\xB8'", "'\xB9'", "'\xBA'", "'\xBB'", 
"'\xBC'", "'\xBD'", "'\xBE'", "'\xBF'", 
"'\xC0'", "'\xC1'", "'\xC2'", "'\xC3'", 
"'\xC4'", "'\xC5'", "'\xC6'", "'\xC7'", 
"'\xC8'", "'\xC9'", "'\xCA'", "'\xCB'", 
"'\xCC'", "'\xCD'", "'\xCE'", "'\xCF'", 
"'\xD0'", "'\xD1'", "'\xD2'", "'\xD3'", 
"'\xD4'", "'\xD5'", "'\xD6'", "'\xD7'", 
"'\xD8'", "'\xD9'", "'\xDA'", "'\xDB'", 
"'\xDC'", "'\xDD'", "'\xDE'", "'\xDF'", 
"'\xE0'", "'\xE1'", "'\xE2'", "'\xE3'", 
"'\xE4'", "'\xE5'", "'\xE6'", "'\xE7'", 
"'\xE8'", "'\xE9'", "'\xEA'", "'\xEB'", 
"'\xEC'", "'\xED'", "'\xEE'", "'\xEF'", 
"'\xF0'", "'\xF1'", "'\xF2'", "'\xF3'", 
"'\xF4'", "'\xF5'", "'\xF6'", "'\xF7'", 
"'\xF8'", "'\xF9'", "'\xFA'", "'\xFB'", 
"'\xFC'", "'\xFD'", "'\xFE'", "'\xFF'", 
"<EOF>", "env", "start", "window_size", 
"expect", "send", "expect_exit", "interact", 
"number", "string", "expect_suspend", "require_version"};
const char *LLgetSymbol(int LLtoken) {
	if (LLtoken < -1 || LLtoken > 267 /* == LL_MAXTOKNO */)
		return (char *) 0;
	return LLsymbolTable[LLtoken+1];
}
#include "input.h"
#line 18 "input.g"

#include <stdlib.h>
#include <ctype.h>
#include <limits.h>
#include "replay.h"
#include "common.h"

static td_bool start_parsed;
static td_bool first_directive;
ExpNode *script;

extern int line_number;
extern const char *file_name;
extern char *yytext;

void LLmessage(int class) {
	switch (class) {
		case LL_MISSINGEOF:
			fatal("%s:%d: Unexpected %s at end of file\n", file_name, line_number, LLgetSymbol(LLsymb));
		case LL_DELETE:
			fatal("%s:%d: Unexpected %s\n", file_name, line_number, LLgetSymbol(LLsymb));
		default:
			fatal("%s:%d: Expected %s before %s\n", file_name, line_number, LLgetSymbol(class), LLgetSymbol(LLsymb));
	}
}

void *safe_calloc(size_t size) {
	void *retval = calloc(1, size);
	if (retval == NULL)
		fatal("Out of memory while reading script\n");
	return retval;
}

char *safe_strdup_remove_quotes(const char *string) {
	size_t size;
	char *retval = strdup(string + 1);

	if (retval == NULL)
		fatal("Out of memory while reading script\n");
	if ((size = strlen(retval)) > 0)
		retval[size - 1] = 0;
	return retval;
}

/** Convert a string from the input format to an internally usable string.
	@param string A @a Token with the string to be converted.
	@param descr A description of the string to be included in error messages.
	@return The length of the resulting string.

	The use of this function processes escape characters. The converted
	characters are written in the original string.
*/
static size_t parseEscapes(char *string) {
	size_t maxReadPosition = strlen(string);
	size_t readPosition = 0, writePosition = 0;
	size_t i;

	while(readPosition < maxReadPosition) {
		if (string[readPosition] == '\\') {
			readPosition++;

			if (readPosition == maxReadPosition)
				fatal("Interal error\n");

			switch(string[readPosition++]) {
				case 'n':
					string[writePosition++] = '\n';
					break;
				case 'r':
					string[writePosition++] = '\r';
					break;
				case '\'':
					string[writePosition++] = '\'';
					break;
				case '\\':
					string[writePosition++] = '\\';
					break;
				case 't':
					string[writePosition++] = '\t';
					break;
				case 'b':
					string[writePosition++] = '\b';
					break;
				case 'f':
					string[writePosition++] = '\f';
					break;
				case 'a':
					string[writePosition++] = '\a';
					break;
				case 'v':
					string[writePosition++] = '\v';
					break;
				case '?':
					string[writePosition++] = '\?';
					break;
				case '"':
					string[writePosition++] = '"';
					break;
				case 'x': {
					/* Hexadecimal escapes */
					unsigned int value = 0;
					/* Read at most two characters, or as many as are valid. */
					for (i = 0; i < 2 && (readPosition + i) < maxReadPosition && isxdigit(string[readPosition + i]); i++) {
						value <<= 4;
						if (isdigit(string[readPosition + i]))
							value += (int) (string[readPosition + i] - '0');
						else
							value += (int) (tolower(string[readPosition + i]) - 'a') + 10;
						if (value > UCHAR_MAX)
							fatal("%s:%d: Invalid hexadecimal escape sequence\n", file_name, line_number);
					}
					readPosition += i;

					if (i == 0)
						fatal("%s:%d: Invalid hexadecimal escape sequence\n", file_name, line_number);

					string[writePosition++] = (char) value;
					break;
				}
				case '0':
				case '1':
				case '2':
				case '3':
				case '4':
				case '5':
				case '6':
				case '7': {
					/* Octal escapes */
					int value = (int)(string[readPosition - 1] - '0');
					size_t maxIdx = string[readPosition - 1] < '4' ? 2 : 1;
					for (i = 0; i < maxIdx && readPosition + i < maxReadPosition && string[readPosition + i] >= '0' && string[readPosition + i] <= '7'; i++)
						value = value * 8 + (int)(string[readPosition + i] - '0');

					readPosition += i;

					string[writePosition++] = (char) value;
					break;
				}
				default:
					string[writePosition++] = string[readPosition - 1];
					break;
			}
		} else {
			string[writePosition++] = string[readPosition++];
		}
	}
	/* Terminate string. */
	string[writePosition] = 0;
	return writePosition;
}


#line 323 "input.c"
static void LL0_input(void);
static ExpNode * LL1_command(void);
static void LL0_input(void){
#line 190 "input.g"
ExpNode *
#line 329 "input.c"
command;
memset(&command, 0, sizeof(command));
{
#line 172 "input.g"

	ExpNode **current = &script;
	start_parsed = td_false;
	first_directive = td_true;

#line 339 "input.c"
LLscnt[0]++;
switch (LLcsymb) {
case 1:/* ENV */
case 2:/* START */
case 3:/* WINDOW_SIZE */
case 4:/* EXPECT */
case 5:/* SEND */
case 6:/* EXPECT_EXIT */
case 7:/* INTERACT */
case 10:/* EXPECT_SUSPEND */
case 11:/* REQUIRE_VERSION */
break;
default: LLskip(); break;
}
LLscnt[0]--;
LLscnt[0]++;
goto LL_0;
for (;;) {
LL_1:
switch (LLcsymb) {
default:
if (LLskip()) goto LL_1;
break;
case 0:/* <NUL> */
break;
case 1:/* ENV */
case 2:/* START */
case 3:/* WINDOW_SIZE */
case 4:/* EXPECT */
case 5:/* SEND */
case 6:/* EXPECT_EXIT */
case 7:/* INTERACT */
case 10:/* EXPECT_SUSPEND */
case 11:/* REQUIRE_VERSION */
LL_0:
LLscnt[0]++;
command = LL1_command();
#line 179 "input.g"
{
			*current = command;
			current = &(*current)->next;
			first_directive = td_false;
		}
#line 383 "input.c"
continue;
}
LLscnt[0]--;
break;
}
#line 185 "input.g"
{
		check_script(file_name, script);
	}
#line 393 "input.c"
}
}
static ExpNode * LL1_command(void){
#line 190 "input.g"
ExpNode *
#line 399 "input.c"
LLretval;
memset(&LLretval, 0, sizeof(LLretval));
{
#line 190 "input.g"

	StringListNode **next;
	LLretval = safe_calloc(sizeof(ExpNode));
	next = &LLretval->un.args;

#line 409 "input.c"
LL_0:
switch (LLcsymb) {
case 1:/* ENV */
LLscnt[0]--;
LLtcnt[9]++;
LLtcnt[9]++;
LL_SCANDONE(257);/* ENV */
LLread();
LLtcnt[9]--;
LL_SCANDONE(265);/* STRING */
#line 197 "input.g"
{
		if (start_parsed)
			fatal("%s:%d: env directive after start directive\n", file_name, line_number);
		LLretval->type = EXP_ENV;
		LLretval->line = line_number;
		*next = safe_calloc(sizeof(StringListNode));
		(*next)->string = safe_strdup_remove_quotes(yytext);
		next = &(*next)->next;
	}
#line 430 "input.c"
LLread();
LLtcnt[9]--;
LL_SCANDONE(265);/* STRING */
#line 207 "input.g"
{
		*next = safe_calloc(sizeof(StringListNode));
		(*next)->string = safe_strdup_remove_quotes(yytext);
		(*next)->length = parseEscapes((*next)->string);
	}
#line 440 "input.c"
LLread();
break;
case 11:/* REQUIRE_VERSION */
LLscnt[0]--;
LLtcnt[8]++;
LL_SCANDONE(267);/* REQUIRE_VERSION */
LLread();
LLtcnt[8]--;
LL_SCANDONE(264);/* NUMBER */
#line 215 "input.g"
{
		if (!first_directive)
			fatal("%s:%d: require_version directive should be the first directive in the recording\n", file_name, line_number);
		LLretval->type = EXP_REQUIRE_VERSION;
		LLretval->line = line_number;
		LLretval->un.number = atoi(yytext);
		if (LLretval->un.number < 1)
			fatal("%s:%d: lowest possible require_version is 1\n", file_name, line_number);
	}
#line 460 "input.c"
LLread();
break;
case 2:/* START */
LLscnt[0]--;
LLtcnt[9]++;
LL_SCANDONE(258);/* START */
#line 226 "input.g"
{
		if (start_parsed)
			fatal("%s:%d: Multiple start directives specified\n", file_name, line_number);
		start_parsed = td_true;
		LLretval->type = EXP_START;
		LLretval->line = line_number;
	}
#line 475 "input.c"
LLread();
switch (LLcsymb) {
case 9:/* STRING */
break;
default: LLskip(); break;
}
LLtcnt[9]--;
LLtcnt[9]++;
goto LL_1;
for (;;) {
LL_2:
switch (LLcsymb) {
default:
if (LLskip()) goto LL_2;
break;
case 0:/* <NUL> */
case 1:/* ENV */
case 2:/* START */
case 3:/* WINDOW_SIZE */
case 4:/* EXPECT */
case 5:/* SEND */
case 6:/* EXPECT_EXIT */
case 7:/* INTERACT */
case 10:/* EXPECT_SUSPEND */
case 11:/* REQUIRE_VERSION */
break;
case 9:/* STRING */
LL_1:
LL_SCANDONE(265);/* STRING */
#line 235 "input.g"
{
			*next = safe_calloc(sizeof(StringListNode));
			(*next)->string = safe_strdup_remove_quotes(yytext);
			(*next)->length = parseEscapes((*next)->string);
			next = &(*next)->next;
		}
#line 512 "input.c"
LLread();
continue;
}
LLtcnt[9]--;
break;
}
break;
case 3:/* WINDOW_SIZE */
LLscnt[0]--;
LLtcnt[8]++;
LLtcnt[8]++;
LLtcnt[8]++;
LL_SCANDONE(259);/* WINDOW_SIZE */
LLread();
LLtcnt[8]--;
LL_SCANDONE(264);/* NUMBER */
#line 245 "input.g"
{
		LLretval->type = EXP_WINDOW_SIZE;
		LLretval->line = line_number;
		LLretval->un.size.columns = atoi(yytext);
	}
#line 535 "input.c"
LLread();
LLtcnt[8]--;
LL_SCANDONE(264);/* NUMBER */
#line 251 "input.g"
{
		LLretval->un.size.rows = atoi(yytext);
	}
#line 543 "input.c"
LLread();
LL_3:
switch (LLcsymb) {
default:
if (LLskip()) goto LL_3;
LLtcnt[8]--;
break;
case 0:/* <NUL> */
case 1:/* ENV */
case 2:/* START */
case 3:/* WINDOW_SIZE */
case 4:/* EXPECT */
case 5:/* SEND */
case 6:/* EXPECT_EXIT */
case 7:/* INTERACT */
case 10:/* EXPECT_SUSPEND */
case 11:/* REQUIRE_VERSION */
LLtcnt[8]--;
break;
case 8:/* NUMBER */
LLtcnt[8]--;
LLtcnt[12]++;
LL_SCANDONE(264);/* NUMBER */
#line 256 "input.g"
{
			LLretval->un.size.delay = atoi(yytext);
		}
#line 571 "input.c"
LLread();
LL_4:
switch (LLcsymb) {
default:
if (LLskip()) goto LL_4;
LLtcnt[12]--;
break;
case 0:/* <NUL> */
case 1:/* ENV */
case 2:/* START */
case 3:/* WINDOW_SIZE */
case 4:/* EXPECT */
case 5:/* SEND */
case 6:/* EXPECT_EXIT */
case 7:/* INTERACT */
case 10:/* EXPECT_SUSPEND */
case 11:/* REQUIRE_VERSION */
LLtcnt[12]--;
break;
case 12:/* '>' */
LLtcnt[12]--;
LLtcnt[8]++;
LL_SCANDONE(62);/* '>' */
LLread();
LLtcnt[8]--;
LL_SCANDONE(264);/* NUMBER */
#line 262 "input.g"
{
				LLretval->un.size.min_delay = atoi(yytext);
				if (LLretval->un.size.min_delay > LLretval->un.size.delay)
					LLretval->un.size.min_delay = LLretval->un.size.delay;
			}
#line 604 "input.c"
LLread();
}
}
break;
case 4:/* EXPECT */
LLscnt[0]--;
LLtcnt[9]++;
LL_SCANDONE(260);/* EXPECT */
#line 271 "input.g"
{
		if (!start_parsed)
			fatal("%s:%d: expect directive before start directive\n", file_name, line_number);
		LLretval->type = EXP_EXPECT;
		LLretval->line = line_number;
	}
#line 620 "input.c"
LLread();
switch (LLcsymb) {
case 9:/* STRING */
break;
default: LLskip(); break;
}
LLtcnt[9]--;
LLtcnt[9]++;
goto LL_5;
for (;;) {
LL_6:
switch (LLcsymb) {
default:
if (LLskip()) goto LL_6;
break;
case 0:/* <NUL> */
case 1:/* ENV */
case 2:/* START */
case 3:/* WINDOW_SIZE */
case 4:/* EXPECT */
case 5:/* SEND */
case 6:/* EXPECT_EXIT */
case 7:/* INTERACT */
case 10:/* EXPECT_SUSPEND */
case 11:/* REQUIRE_VERSION */
break;
case 9:/* STRING */
LL_5:
LL_SCANDONE(265);/* STRING */
#line 279 "input.g"
{
			*next = safe_calloc(sizeof(StringListNode));
			(*next)->string = safe_strdup_remove_quotes(yytext);
			(*next)->length = parseEscapes((*next)->string);
			next = &(*next)->next;
		}
#line 657 "input.c"
LLread();
continue;
}
LLtcnt[9]--;
break;
}
break;
case 5:/* SEND */
LLscnt[0]--;
LLscnt[1]++;
LL_SCANDONE(261);/* SEND */
#line 288 "input.g"
{
		if (!start_parsed)
			fatal("%s:%d: send directive before start directive\n", file_name, line_number);
		LLretval->type = EXP_SEND;
		LLretval->line = line_number;
	}
#line 676 "input.c"
LLread();
switch (LLcsymb) {
case 8:/* NUMBER */
break;
default: LLskip(); break;
}
LLscnt[1]--;
LLtcnt[8]++;
goto LL_7;
for (;;) {
LL_8:
switch (LLcsymb) {
default:
if (LLskip()) goto LL_8;
break;
case 0:/* <NUL> */
case 1:/* ENV */
case 2:/* START */
case 3:/* WINDOW_SIZE */
case 4:/* EXPECT */
case 5:/* SEND */
case 6:/* EXPECT_EXIT */
case 7:/* INTERACT */
case 10:/* EXPECT_SUSPEND */
case 11:/* REQUIRE_VERSION */
break;
case 8:/* NUMBER */
LL_7:
LLtcnt[12]++;
LLtcnt[9]++;
LL_SCANDONE(264);/* NUMBER */
#line 296 "input.g"
{
			*next = safe_calloc(sizeof(StringListNode));
			(*next)->delay = atoi(yytext);
		}
#line 713 "input.c"
LLread();
LL_9:
switch (LLcsymb) {
default:
if (LLskip()) goto LL_9;
LLtcnt[12]--;
break;
case 9:/* STRING */
LLtcnt[12]--;
break;
case 12:/* '>' */
LLtcnt[12]--;
LLtcnt[8]++;
LL_SCANDONE(62);/* '>' */
LLread();
LLtcnt[8]--;
LL_SCANDONE(264);/* NUMBER */
#line 303 "input.g"
{
				(*next)->min_delay = atoi(yytext);
				if ((*next)->delay < (*next)->min_delay)
					(*next)->min_delay = (*next)->delay;
			}
#line 737 "input.c"
LLread();
}
LLtcnt[9]--;
LL_SCANDONE(265);/* STRING */
#line 310 "input.g"
{
			(*next)->string = safe_strdup_remove_quotes(yytext);
			(*next)->length = parseEscapes((*next)->string);
			next = &(*next)->next;
		}
#line 748 "input.c"
LLread();
continue;
}
LLtcnt[8]--;
break;
}
break;
case 6:/* EXPECT_EXIT */
LLscnt[0]--;
LLtcnt[8]++;
LL_SCANDONE(262);/* EXPECT_EXIT */
LLread();
LLtcnt[8]--;
LL_SCANDONE(264);/* NUMBER */
#line 319 "input.g"
{
		if (!start_parsed)
			fatal("%s:%d: expect_exit directive before start directive\n", file_name, line_number);
		LLretval->type = EXP_EXPECT_EXIT;
		LLretval->line = line_number;
		LLretval->un.number = atoi(yytext);
	}
#line 771 "input.c"
LLread();
break;
default:
if (LLskip())
goto LL_0;
/*FALLTHROUGH*/
case 10:/* EXPECT_SUSPEND */
LLscnt[0]--;
LL_SCANDONE(266);/* EXPECT_SUSPEND */
#line 328 "input.g"
{
		if (!start_parsed)
			fatal("%s:%d: expect_suspend directive before start directive\n", file_name, line_number);
		LLretval->type = EXP_EXPECT_SUSPEND;
		LLretval->line = line_number;
	}
#line 788 "input.c"
LLread();
break;
case 7:/* INTERACT */
LLscnt[0]--;
LL_SCANDONE(263);/* INTERACT */
#line 336 "input.g"
{
		if (!start_parsed)
			fatal("%s:%d: interact directive before start directive\n", file_name, line_number);
		LLretval->type = EXP_INTERACT;
		LLretval->line = line_number;
	}
#line 801 "input.c"
LLread();
break;
}
}
return LLretval;
}
void parse(void) {
	memset(LLscnt, 0, LL_NSETS * sizeof(int));
	memset(LLtcnt, 0, LL_NTERMINALS * sizeof(int));
	LLtcnt[0]++;
	LLsymb = 0;
	LLreissue = -2 /* LL_NEW_TOKEN */;
	LLread();
	LL0_input();
	if (LLcsymb != 0) LLerror(256 /* EOFILE*/);
}

