


generic package clex_g(package tokens: Ckit_Tokens;
package tok_table : Token_Table;
sharing tok_table::tokens == tokens;){
# Compiled by:
# src/lib/c-kit/src/parser/c-parser.sublib package user_declarations {
## Copyright (c) 1998 by Lucent Technologies
# The following replacement for c.lex should give correct (ANSI)
# In particular, we don't allow
#
# char *t = "abd
# lkj";
#
# GCC accepts this, but SGI cc does not. This program is not ANSI
# compliant.
### "Syntax, my lad. It has been restored
### to the highest place in the republic."
###
### -- John Steinbeck
Semantic_Value = tokens::Semantic_Value;
Source_Position = Int;
Lex_Result = tokens::Token( Semantic_Value, Source_Position );
Err_Warn = { err: (Source_Position, Source_Position, String) -> Void,
warn: (Source_Position, Source_Position, String) -> Void
};
Lex_Arg = { comment_nesting_depth : Ref Int,
line_number_db : line_number_db::Sourcemap,
charlist : Ref List String,
stringstart : Ref Int, # start of current string or comment
err_warn: Err_Warn
};
Arg = Lex_Arg;
Token( X, Y ) = tokens::Token( X, Y );
fun ordof (s, i) = char::to_int (string::get (s, i));
fun dec (i_ref : Ref Int) = i_ref := *i_ref - 1;
fun inc (i_ref : Ref Int) = i_ref := *i_ref + 1;
fun chr i = string::from_char(char::from_int i);
fun ord s = char::to_int(string::get(s, 0));
fun explode s = vector_of_chars::fold_backward (fn (c, l) = str c ! l) [] s;
fun implode str_list = string::cat str_list;
fun hd [] => { print "c.lex: hd of empty\n";
raise exception EMPTY;
};
hd (h ! l) => h;
end;
eof = fn ({ comment_nesting_depth,err_warn,line_number_db,stringstart,charlist}: Lex_Arg) =
{ pos = int::max(*stringstart+2, line_number_db::curr_pos line_number_db);
if (*comment_nesting_depth > 0 )
err_warn.err ( *stringstart, pos, "unclosed comment" );
fi;
tokens::eof(pos,pos);
};
fun add_string (charlist,s: String) = charlist := s ! *charlist;
fun make_string charlist = (implode(reverse *charlist) before charlist := NIL);
fun make_hex_int (s,a,b,err_warn: Err_Warn)
=
case (number_string::scan_string
(large_int::scan number_string::HEX)
s
)
THE i => i;
_ => { err_warn.err(a,b,"trouble in parsing int");
#
int::to_multiword_int 0;
};
esac
except
OVERFLOW
=
{ err_warn.err(a,b,"large int const");
#
int::to_multiword_int 0;
};
fun make_hex_char (args as (s, a, b, err_warn: Err_Warn)): Int /* returns a character sized integer */
=
{ i = make_hex_int args;
if (i>255)
err_warn.warn (a,b,"overflow in hexadecimal escape sequence");
multiword_int::to_int(i % 256);
else
multiword_int::to_int i;
fi;
};
fun make_oct_int (s,a,b,err_warn: Err_Warn)
=
( case (number_string::scan_string
(large_int::scan number_string::OCTAL)
s
)
THE i => i;
_ => { err_warn.err(a,b,"trouble in parsing int");
#
int::to_multiword_int 0;
};
esac
except
OVERFLOW
=
{ err_warn.err(a,b,"large int const");
#
int::to_multiword_int 0;
}
);
fun make_oct_char (args as (s, a, b, err_warn: Err_Warn)) /* returns a character sized integer */
=
{ i = make_oct_int args;
if (i>255)
err_warn.warn (a,b,"overflow in octal escape sequence");
multiword_int::to_int(i % 256);
else
multiword_int::to_int i;
fi;
};
fun make_int (s,a,b,err_warn: Err_Warn)
=
case (number_string::scan_string
(large_int::scan number_string::DECIMAL)
s
)
THE i => i;
_ => { err_warn.err(a,b,"trouble in parsing int");
#
int::to_multiword_int 0;
};
esac
except
OVERFLOW
=
{ err_warn.err(a,b,"large int const");
#
int::to_multiword_int 0;
};
fun make_real_num (s,a,b,err_warn: Err_Warn)
=
( case (number_string::scan_string
eight_byte_float::scan
s
)
THE r => r;
_ => { err_warn.err(a,b,"trouble in parsing real");
0.0;
};
esac
except
OVERFLOW
=
{ err_warn.err(a,b,"large real const");
0.0;
}
);
backslasha = 7;
fun special_char (c,fst,last,err_warn: Err_Warn)
=
case c
"\\a" => 7;
"\\b" => 8;
"\\f" => 12;
"\\n" => 10;
"\\r" => 13;
"\\t" => 9;
"\\v" => 11;
_ => ordof(c,1);
/* strictly speaking, should only handle
\?, \\, \", \', but it is common
to simply ignore slash, and just use next char */
esac;
/* Notes on lexer states:
initial -- predefined start state and the default token state
S -- inside a string (entered from INTITAL with ")
C -- inside a comment (entered from initial with /-* )
*/
}; # end of user routines
exception LEX_ERROR; # Raised if illegal leaf action tried.
package internal {
Yyfinstate = NN Int;
Statedata = { fin: List( Yyfinstate ), trans: String };
# transition & final state table
tab = {
s = [
(0,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(1,
"\007\007\007\007\007\007\007\007\007\095\097\007\095\007\007\007\
\\007\007\007\007\007\007\007\007\007\007\007\007\007\007\007\007\
\\095\093\092\007\007\090\087\073\072\071\069\066\065\061\057\054\
\\044\033\033\033\033\033\033\033\033\033\032\031\027\025\021\020\
\\007\014\014\014\014\014\014\014\014\014\014\014\014\014\014\014\
\\014\014\014\014\014\014\014\014\014\014\014\019\007\018\016\014\
\\007\014\014\014\014\014\014\014\014\014\014\014\014\014\014\014\
\\014\014\014\014\014\014\014\014\014\014\014\013\010\009\008\007\
\\007"
),
(2,
"\007\007\007\007\007\007\007\007\007\101\097\007\101\007\007\007\
\\007\007\007\007\007\007\007\007\007\007\007\007\007\007\007\007\
\\101\093\092\098\007\090\087\073\072\071\069\066\065\061\057\054\
\\044\033\033\033\033\033\033\033\033\033\032\031\027\025\021\020\
\\007\014\014\014\014\014\014\014\014\014\014\014\014\014\014\014\
\\014\014\014\014\014\014\014\014\014\014\014\019\007\018\016\014\
\\007\014\014\014\014\014\014\014\014\014\014\014\014\014\014\014\
\\014\014\014\014\014\014\014\014\014\014\014\013\010\009\008\007\
\\007"
),
(3,
"\103\103\103\103\103\103\103\103\103\106\097\103\106\103\103\103\
\\103\103\103\103\103\103\103\103\103\103\103\103\103\103\103\103\
\\106\103\103\103\103\103\103\103\103\103\104\103\103\103\103\103\
\\103\103\103\103\103\103\103\103\103\103\103\103\103\103\103\103\
\\103\103\103\103\103\103\103\103\103\103\103\103\103\103\103\103\
\\103\103\103\103\103\103\103\103\103\103\103\103\103\103\103\103\
\\103\103\103\103\103\103\103\103\103\103\103\103\103\103\103\103\
\\103\103\103\103\103\103\103\103\103\103\103\103\103\103\103\103\
\\103"
),
(4,
"\103\103\103\103\103\103\103\103\103\108\097\103\108\103\103\103\
\\103\103\103\103\103\103\103\103\103\103\103\103\103\103\103\103\
\\108\103\103\107\103\103\103\103\103\103\104\103\103\103\103\103\
\\103\103\103\103\103\103\103\103\103\103\103\103\103\103\103\103\
\\103\103\103\103\103\103\103\103\103\103\103\103\103\103\103\103\
\\103\103\103\103\103\103\103\103\103\103\103\103\103\103\103\103\
\\103\103\103\103\103\103\103\103\103\103\103\103\103\103\103\103\
\\103\103\103\103\103\103\103\103\103\103\103\103\103\103\103\103\
\\103"
),
(5,
"\109\109\109\109\109\109\109\109\109\109\122\109\109\109\109\109\
\\109\109\109\109\109\109\109\109\109\109\109\109\109\109\109\109\
\\109\109\121\109\109\109\109\109\109\109\109\109\109\109\109\109\
\\109\109\109\109\109\109\109\109\109\109\109\109\109\109\109\109\
\\109\109\109\109\109\109\109\109\109\109\109\109\109\109\109\109\
\\109\109\109\109\109\109\109\109\109\109\109\109\110\109\109\109\
\\109\109\109\109\109\109\109\109\109\109\109\109\109\109\109\109\
\\109\109\109\109\109\109\109\109\109\109\109\109\109\109\109\109\
\\109"
),
(10,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\012\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\011\000\000\000\
\\000"
),
(14,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\015\015\015\015\015\015\015\015\015\015\000\000\000\000\000\000\
\\000\015\015\015\015\015\015\015\015\015\015\015\015\015\015\015\
\\015\015\015\015\015\015\015\015\015\015\015\000\000\000\000\015\
\\000\015\015\015\015\015\015\015\015\015\015\015\015\015\015\015\
\\015\015\015\015\015\015\015\015\015\015\015\000\000\000\000\000\
\\000"
),
(16,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\017\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(21,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\024\022\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(22,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\023\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(25,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\026\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(27,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\029\028\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(29,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\030\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(33,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\042\000\
\\041\041\041\041\041\041\041\041\041\041\000\000\000\000\000\000\
\\000\000\000\000\000\037\000\000\000\000\000\000\036\000\000\000\
\\000\000\000\000\000\034\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\037\000\000\000\000\000\000\036\000\000\000\
\\000\000\000\000\000\034\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(34,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\035\000\000\000\
\\000\000\000\000\000\035\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\035\000\000\000\
\\000\000\000\000\000\035\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(37,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\040\000\040\000\000\
\\038\038\038\038\038\038\038\038\038\038\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(38,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\038\038\038\038\038\038\038\038\038\038\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\039\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\039\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(40,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\038\038\038\038\038\038\038\038\038\038\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(42,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\043\043\043\043\043\043\043\043\043\043\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(43,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\043\043\043\043\043\043\043\043\043\043\000\000\000\000\000\000\
\\000\000\000\000\000\037\000\000\000\000\000\000\039\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\037\000\000\000\000\000\000\039\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(44,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\042\000\
\\050\050\050\050\050\050\050\050\049\049\000\000\000\000\000\000\
\\000\000\000\000\000\037\000\000\000\000\000\000\036\000\000\000\
\\000\000\000\000\000\034\000\000\045\000\000\000\000\000\000\000\
\\000\000\000\000\000\037\000\000\000\000\000\000\036\000\000\000\
\\000\000\000\000\000\034\000\000\045\000\000\000\000\000\000\000\
\\000"
),
(45,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\046\046\046\046\046\046\046\046\046\046\000\000\000\000\000\000\
\\000\046\046\046\046\046\046\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\046\046\046\046\046\046\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(46,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\046\046\046\046\046\046\046\046\046\046\000\000\000\000\000\000\
\\000\046\046\046\046\046\046\000\000\000\000\000\047\000\000\000\
\\000\000\000\000\000\047\000\000\000\000\000\000\000\000\000\000\
\\000\046\046\046\046\046\046\000\000\000\000\000\047\000\000\000\
\\000\000\000\000\000\047\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(47,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\048\000\000\000\
\\000\000\000\000\000\048\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\048\000\000\000\
\\000\000\000\000\000\048\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(49,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\042\000\
\\049\049\049\049\049\049\049\049\049\049\000\000\000\000\000\000\
\\000\000\000\000\000\037\000\000\000\000\000\000\039\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\037\000\000\000\000\000\000\039\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(50,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\042\000\
\\050\050\050\050\050\050\050\050\049\049\000\000\000\000\000\000\
\\000\000\000\000\000\037\000\000\000\000\000\000\053\000\000\000\
\\000\000\000\000\000\051\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\037\000\000\000\000\000\000\053\000\000\000\
\\000\000\000\000\000\051\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(51,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\052\000\000\000\
\\000\000\000\000\000\052\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\052\000\000\000\
\\000\000\000\000\000\052\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(54,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\056\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\055\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(57,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\059\000\
\\058\058\058\058\058\058\058\058\058\058\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(58,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\058\058\058\058\058\058\058\058\058\058\000\000\000\000\000\000\
\\000\000\000\000\000\037\000\000\000\000\000\000\039\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\037\000\000\000\000\000\000\039\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(59,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\060\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(61,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\064\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\063\062\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(66,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\068\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\067\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(69,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\070\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(73,
"\074\074\074\074\074\074\074\074\074\074\000\074\074\074\074\074\
\\074\074\074\074\074\074\074\074\074\074\074\074\074\074\074\074\
\\074\074\074\074\074\074\074\074\074\074\074\074\074\074\074\074\
\\074\074\074\074\074\074\074\074\074\074\074\074\074\074\074\074\
\\074\074\074\074\074\074\074\074\074\074\074\074\074\074\074\074\
\\074\074\074\074\074\074\074\074\074\074\074\074\076\074\074\074\
\\074\074\074\074\074\074\074\074\074\074\074\074\074\074\074\074\
\\074\074\074\074\074\074\074\074\074\074\074\074\074\074\074\074\
\\074"
),
(74,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\075\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(76,
"\077\077\077\077\077\077\077\077\077\077\000\077\077\077\077\077\
\\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\
\\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\
\\082\082\082\082\082\082\082\082\077\077\077\077\077\077\077\077\
\\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\
\\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\
\\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\
\\077\077\077\077\077\077\077\077\079\077\077\077\077\077\077\077\
\\077"
),
(77,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\078\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(79,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\078\000\000\000\000\000\000\000\000\
\\080\080\080\080\080\080\080\080\080\080\000\000\000\000\000\000\
\\000\080\080\080\080\080\080\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\080\080\080\080\080\080\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(80,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\081\000\000\000\000\000\000\000\000\
\\080\080\080\080\080\080\080\080\080\080\000\000\000\000\000\000\
\\000\080\080\080\080\080\080\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\080\080\080\080\080\080\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(82,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\086\000\000\000\000\000\000\000\000\
\\083\083\083\083\083\083\083\083\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(83,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\085\000\000\000\000\000\000\000\000\
\\084\084\084\084\084\084\084\084\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(84,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\085\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(87,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\089\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\088\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(90,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\091\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(93,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\094\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(95,
"\000\000\000\000\000\000\000\000\000\096\000\000\096\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\096\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(98,
"\099\099\099\099\099\099\099\099\099\099\100\099\099\099\099\099\
\\099\099\099\099\099\099\099\099\099\099\099\099\099\099\099\099\
\\099\099\099\099\099\099\099\099\099\099\099\099\099\099\099\099\
\\099\099\099\099\099\099\099\099\099\099\099\099\099\099\099\099\
\\099\099\099\099\099\099\099\099\099\099\099\099\099\099\099\099\
\\099\099\099\099\099\099\099\099\099\099\099\099\099\099\099\099\
\\099\099\099\099\099\099\099\099\099\099\099\099\099\099\099\099\
\\099\099\099\099\099\099\099\099\099\099\099\099\099\099\099\099\
\\099"
),
(101,
"\000\000\000\000\000\000\000\000\000\102\000\000\102\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\102\000\000\099\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(104,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\105\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(109,
"\109\109\109\109\109\109\109\109\109\109\000\109\109\109\109\109\
\\109\109\109\109\109\109\109\109\109\109\109\109\109\109\109\109\
\\109\109\000\109\109\109\109\109\109\109\109\109\109\109\109\109\
\\109\109\109\109\109\109\109\109\109\109\109\109\109\109\109\109\
\\109\109\109\109\109\109\109\109\109\109\109\109\109\109\109\109\
\\109\109\109\109\109\109\109\109\109\109\109\109\000\109\109\109\
\\109\109\109\109\109\109\109\109\109\109\109\109\109\109\109\109\
\\109\109\109\109\109\109\109\109\109\109\109\109\109\109\109\109\
\\109"
),
(110,
"\111\111\111\111\111\111\111\111\111\111\120\111\111\111\111\111\
\\111\111\111\111\111\111\111\111\111\111\111\111\111\111\111\111\
\\111\111\111\111\111\111\111\111\111\111\111\111\111\111\111\111\
\\119\116\116\116\116\116\116\116\111\111\111\111\111\111\111\111\
\\111\111\111\111\111\111\111\111\111\111\111\111\111\111\111\111\
\\111\111\111\111\111\111\111\111\111\111\111\111\111\111\114\111\
\\111\111\111\111\111\111\111\111\111\111\111\111\111\111\111\111\
\\111\111\111\111\111\111\111\111\112\111\111\111\111\111\111\111\
\\111"
),
(112,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\113\113\113\113\113\113\113\113\113\113\000\000\000\000\000\000\
\\000\113\113\113\113\113\113\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\113\113\113\113\113\113\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(114,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\115\115\115\115\115\115\115\115\115\115\115\115\115\115\115\115\
\\115\115\115\115\115\115\115\115\115\115\115\115\115\115\115\115\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(116,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\117\117\117\117\117\117\117\117\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(117,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\118\118\118\118\118\118\118\118\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\\000"
),
(0, "")];
fun f x = x;
s = map f (reverse (tail (reverse s)));
exception LEX_HACKING_ERROR;
fun get ((j, x) ! r, i: Int)
=>
if (i == j) x; else get (r, i); fi;
get ([], i)
=>
raise exception LEX_HACKING_ERROR;
end;
fun g { fin => x, trans => i }
=
{ fin => x, trans => get (s, i) };
vector::from_list (map g
[{ fin => [], trans => 0},
{ fin => [(NN 10)], trans => 1},
{ fin => [(NN 10)], trans => 2},
{ fin => [(NN 10)], trans => 3},
{ fin => [(NN 10)], trans => 4},
{ fin => [(NN 26)], trans => 5},
{ fin => [(NN 26)], trans => 5},
{ fin => [(NN 227)], trans => 0},
{ fin => [(NN 96), (NN 227)], trans => 0},
{ fin => [(NN 65), (NN 227)], trans => 0},
{ fin => [(NN 100), (NN 227)], trans => 10},
{ fin => [(NN 157)], trans => 0},
{ fin => [(NN 136)], trans => 0},
{ fin => [(NN 63), (NN 227)], trans => 0},
{ fin => [(NN 225), (NN 227)], trans => 14},
{ fin => [(NN 225)], trans => 14},
{ fin => [(NN 79), (NN 227)], trans => 16},
{ fin => [(NN 124)], trans => 0},
{ fin => [(NN 61), (NN 227)], trans => 0},
{ fin => [(NN 59), (NN 227)], trans => 0},
{ fin => [(NN 98), (NN 227)], trans => 0},
{ fin => [(NN 151), (NN 227)], trans => 21},
{ fin => [(NN 166)], trans => 22},
{ fin => [(NN 147)], trans => 0},
{ fin => [(NN 110)], trans => 0},
{ fin => [(NN 115), (NN 227)], trans => 25},
{ fin => [(NN 113)], trans => 0},
{ fin => [(NN 149), (NN 227)], trans => 27},
{ fin => [(NN 107)], trans => 0},
{ fin => [(NN 163)], trans => 29},
{ fin => [(NN 143)], trans => 0},
{ fin => [(NN 53), (NN 227)], trans => 0},
{ fin => [(NN 51), (NN 227)], trans => 0},
{ fin => [(NN 185), (NN 199), (NN 227)], trans => 33},
{ fin => [(NN 185)], trans => 34},
{ fin => [(NN 185)], trans => 0},
{ fin => [(NN 185), (NN 199)], trans => 34},
{ fin => [], trans => 37},
{ fin => [(NN 199)], trans => 38},
{ fin => [(NN 199)], trans => 0},
{ fin => [], trans => 40},
{ fin => [(NN 185), (NN 199)], trans => 33},
{ fin => [], trans => 42},
{ fin => [(NN 199)], trans => 43},
{ fin => [(NN 185), (NN 199), (NN 227)], trans => 44},
{ fin => [], trans => 45},
{ fin => [(NN 179)], trans => 46},
{ fin => [(NN 179)], trans => 47},
{ fin => [(NN 179)], trans => 0},
{ fin => [(NN 199)], trans => 49},
{ fin => [(NN 172), (NN 199)], trans => 50},
{ fin => [(NN 172)], trans => 51},
{ fin => [(NN 172)], trans => 0},
{ fin => [(NN 172), (NN 199)], trans => 51},
{ fin => [(NN 94), (NN 227)], trans => 54},
{ fin => [(NN 133)], trans => 0},
{ fin => [(NN 13)], trans => 0},
{ fin => [(NN 67), (NN 227)], trans => 57},
{ fin => [(NN 199)], trans => 58},
{ fin => [], trans => 59},
{ fin => [(NN 71)], trans => 0},
{ fin => [(NN 83), (NN 227)], trans => 61},
{ fin => [(NN 92)], trans => 0},
{ fin => [(NN 121)], trans => 0},
{ fin => [(NN 89)], trans => 0},
{ fin => [(NN 73), (NN 227)], trans => 0},
{ fin => [(NN 81), (NN 227)], trans => 66},
{ fin => [(NN 118)], trans => 0},
{ fin => [(NN 86)], trans => 0},
{ fin => [(NN 75), (NN 227)], trans => 69},
{ fin => [(NN 130)], trans => 0},
{ fin => [(NN 57), (NN 227)], trans => 0},
{ fin => [(NN 55), (NN 227)], trans => 0},
{ fin => [(NN 227)], trans => 73},
{ fin => [], trans => 74},
{ fin => [(NN 217)], trans => 0},
{ fin => [], trans => 76},
{ fin => [], trans => 77},
{ fin => [(NN 222)], trans => 0},
{ fin => [], trans => 79},
{ fin => [], trans => 80},
{ fin => [(NN 213)], trans => 0},
{ fin => [], trans => 82},
{ fin => [], trans => 83},
{ fin => [], trans => 84},
{ fin => [(NN 206)], trans => 0},
{ fin => [(NN 206), (NN 222)], trans => 0},
{ fin => [(NN 102), (NN 227)], trans => 87},
{ fin => [(NN 139)], trans => 0},
{ fin => [(NN 160)], trans => 0},
{ fin => [(NN 104), (NN 227)], trans => 90},
{ fin => [(NN 127)], trans => 0},
{ fin => [(NN 20), (NN 227)], trans => 0},
{ fin => [(NN 77), (NN 227)], trans => 93},
{ fin => [(NN 154)], trans => 0},
{ fin => [(NN 10), (NN 227)], trans => 95},
{ fin => [(NN 10)], trans => 95},
{ fin => [(NN 7)], trans => 0},
{ fin => [(NN 227)], trans => 98},
{ fin => [], trans => 98},
{ fin => [(NN 5)], trans => 0},
{ fin => [(NN 10), (NN 227)], trans => 101},
{ fin => [(NN 10)], trans => 101},
{ fin => [(NN 18)], trans => 0},
{ fin => [(NN 18)], trans => 104},
{ fin => [(NN 16)], trans => 0},
{ fin => [(NN 10), (NN 18)], trans => 95},
{ fin => [(NN 18)], trans => 98},
{ fin => [(NN 10), (NN 18)], trans => 101},
{ fin => [(NN 26)], trans => 109},
{ fin => [], trans => 110},
{ fin => [(NN 49)], trans => 0},
{ fin => [(NN 49)], trans => 112},
{ fin => [(NN 42)], trans => 112},
{ fin => [(NN 49)], trans => 114},
{ fin => [(NN 46)], trans => 0},
{ fin => [(NN 49)], trans => 116},
{ fin => [], trans => 117},
{ fin => [(NN 37)], trans => 0},
{ fin => [(NN 32), (NN 49)], trans => 116},
{ fin => [(NN 29)], trans => 0},
{ fin => [(NN 22)], trans => 0},
{ fin => [(NN 24)], trans => 0}]);
};
package start_states {
Yystartstate = STARTSTATE Int;
# start state definitions
my ccc = STARTSTATE 3;
my initial = STARTSTATE 1;
my sss = STARTSTATE 5;
};
Result = user_declarations::Lex_Result;
exception LEXER_ERROR; # Raised if illegal leaf action tried */
};
fun make_lexer yyinput =
{ my yygone0=1;
yyb = REF "\n"; # Buffer
yybl = REF 1; # Buffer length
yybufpos = REF 1; # location of next character to use
yygone = REF yygone0; # position in file of beginning of buffer
yydone = REF FALSE; # eof found yet?
yybegin_i = REF 1; # Current 'start state' for lexer
yybegin = fn (internal::start_states::STARTSTATE x) =
yybegin_i := x;
fun lex (yyarg as ({ comment_nesting_depth,err_warn,line_number_db,charlist,stringstart })) =
{ fun continue () : internal::Result =
{ fun scan (s, accepting_leaves: List( List( internal::Yyfinstate ) ), l, i0) =
{ fun action (i, NIL) => raise exception LEX_ERROR;
action (i, NIL ! l) => action (i - 1, l);
action (i, (node ! acts) ! l) =>
case node
internal::NN yyk =>
( { fun yymktext () = substring(*yyb, i0, i-i0);
yypos = i0 + *yygone;
include user_declarations;
include internal::start_states;
{ yybufpos := i;
case yyk
# Application actions
10 => { continue(); };
100 => { tokens::bar(yypos,yypos+1); };
102 => { tokens::amp(yypos,yypos+1); };
104 => { tokens::percent(yypos,yypos+1); };
107 => { tokens::lte(yypos,yypos+2); };
110 => { tokens::gte(yypos,yypos+2); };
113 => { tokens::eq(yypos,yypos+2); };
115 => { tokens::equals(yypos,yypos+1); };
118 => { tokens::plusequals(yypos,yypos+2); };
121 => { tokens::minusequals(yypos,yypos+2); };
124 => { tokens::xorequals(yypos,yypos+2); };
127 => { tokens::modequals(yypos,yypos+2); };
13 => { yybegin ccc; continue(); };
130 => { tokens::timesequals(yypos,yypos+2); };
133 => { tokens::divequals(yypos,yypos+2); };
136 => { tokens::orequals(yypos,yypos+2); };
139 => { tokens::andequals(yypos,yypos+2); };
143 => { tokens::lshiftequals(yypos,yypos+3); };
147 => { tokens::rshiftequals(yypos,yypos+3); };
149 => { tokens::lt(yypos,yypos+1); };
151 => { tokens::gt(yypos,yypos+1); };
154 => { tokens::neq(yypos,yypos+2); };
157 => { tokens::or_t(yypos,yypos+2); };
16 => { yybegin initial; continue(); };
160 => { tokens::and_t(yypos,yypos+2); };
163 => { tokens::lshift(yypos,yypos+2); };
166 => { tokens::rshift(yypos,yypos+2); };
172 => { yytext=yymktext();
tokens::decnum(make_oct_int(yytext,yypos,yypos+size(yytext),err_warn),yypos, yypos+size(yytext)); };
179 => { yytext=yymktext();
tokens::decnum(make_hex_int(yytext,yypos,yypos+size(yytext),err_warn),yypos, yypos+size(yytext)); };
18 => { continue(); };
185 => { yytext=yymktext();
tokens::decnum(make_int (yytext,yypos,yypos+size(yytext),err_warn), yypos,yypos+size(yytext)); };
199 => { yytext=yymktext();
tokens::realnum(make_real_num(yytext,yypos,yypos+size(yytext),err_warn), yypos, yypos
+ size(yytext)); };
20 => { charlist := [""]; stringstart := yypos; yybegin sss; continue(); };
206 => { yytext=yymktext();
{ s = substring(yytext, 2, size(yytext) - 3);
tokens::cconst(multiword_int::from_int (make_oct_char(s,yypos,yypos+size(yytext),err_warn)),
yypos,
yypos+size(yytext));
}; };
213 => { yytext=yymktext();
{ s = substring(yytext, 3, size(yytext) - 4);
tokens::cconst(multiword_int::from_int (make_hex_char(s,yypos,yypos+size(yytext),err_warn)),
yypos,
yypos+size(yytext));
}; };
217 => { yytext=yymktext();
{ cval = ordof(yytext,1);
tokens::cconst(int::to_multiword_int cval, yypos, yypos+size(yytext));
}; };
22 => { yybegin initial;tokens::string_constant(make_string charlist,*stringstart,yypos+1); };
222 => { yytext=yymktext();
tokens::cconst(multiword_int::from_int(special_char(substring(yytext,1,size(yytext) - 2),yypos,yypos+size(yytext),err_warn)), yypos, yypos+size(yytext)); };
225 => { yytext=yymktext();
tok_table::check_token(yytext,yypos); };
227 => { continue(); };
24 => { err_warn.err (*stringstart,yypos,"unclosed string");
line_number_db::newline line_number_db yypos;
yybegin initial; tokens::string_constant(make_string charlist,*stringstart,yypos); };
26 => { yytext=yymktext();
add_string(charlist,yytext); continue(); };
29 => { line_number_db::newline line_number_db yypos; continue(); };
32 => { add_string(charlist,chr 0);continue(); };
37 => { yytext=yymktext();
add_string(charlist, chr(make_oct_char(substring(yytext, 1, size(yytext) - 1), yypos, yypos+size(yytext), err_warn))); continue(); };
42 => { yytext=yymktext();
add_string(charlist, chr(make_hex_char(substring(yytext, 2, size(yytext) - 2), yypos, yypos+size(yytext), err_warn))); continue(); };
46 => { yytext=yymktext();
add_string(charlist,chr(ordof(yytext,2)-ord("@"))); continue(); };
49 => { yytext=yymktext();
add_string(charlist, chr(special_char(yytext, yypos, yypos+size(yytext), err_warn))); continue(); };
5 => { yytext=yymktext();
line_number_db::parse_directive line_number_db
(yypos,yytext); continue(); };
51 => { tokens::colon(yypos,yypos+1); };
53 => { tokens::semicolon(yypos,yypos+1); };
55 => { tokens::lparen(yypos,yypos+1); };
57 => { tokens::rparen(yypos,yypos+1); };
59 => { tokens::lbrace(yypos,yypos+1); };
61 => { tokens::rbrace(yypos,yypos+1); };
63 => { tokens::lcurly(yypos,yypos+1); };
65 => { tokens::rcurly(yypos,yypos+1); };
67 => { tokens::dot(yypos,yypos+1); };
7 => { line_number_db::newline line_number_db yypos; continue(); };
71 => { tokens::elipsis(yypos,yypos+3); };
73 => { tokens::comma(yypos,yypos+1); };
75 => { tokens::times(yypos,yypos+1); };
77 => { tokens::bang(yypos,yypos+1); };
79 => { tokens::hat(yypos,yypos+1); };
81 => { tokens::plus(yypos,yypos+1); };
83 => { tokens::minus(yypos,yypos+1); };
86 => { tokens::inc(yypos,yypos+2); };
89 => { tokens::dec(yypos,yypos+2); };
92 => { tokens::arrow(yypos,yypos+1); };
94 => { tokens::divide(yypos,yypos+1); };
96 => { tokens::tilde(yypos,yypos+1); };
98 => { tokens::question(yypos,yypos+1); };
_ => raise exception internal::LEXER_ERROR;
esac; }; } ); esac; end; # fun action
my { fin, trans } = unsafe::vector::get (internal::tab, s);
new_accepting_leaves = fin ! accepting_leaves;
if (l == *yybl)
if (trans == .trans (vector::get (internal::tab, 0)))
action (l, new_accepting_leaves);
else newchars= if *yydone ""; else yyinput 1024; fi;
if ((size newchars) == 0)
yydone := TRUE;
if (l == i0) user_declarations::eof yyarg;
else action (l, new_accepting_leaves); fi;
else if (l == i0) yyb := newchars;
else yyb := substring(*yyb, i0, l-i0) + newchars; fi;
yygone := *yygone+i0;
yybl := size *yyb;
scan (s, accepting_leaves, l-i0, 0);
fi; # (size newchars) == 0
fi; # trans == $trans ...
else new_char = char::to_int (unsafe::vector_of_chars::get(*yyb, l));
new_char = if (new_char < 128) new_char; else 128; fi;
new_state = char::to_int (unsafe::vector_of_chars::get (trans, new_char));
if (new_state == 0) action (l, new_accepting_leaves);
else scan (new_state, new_accepting_leaves, l+1, i0); fi;
fi;
}; # fun scan
start= if (substring(*yyb,*yybufpos - 1, 1)=="\n") *yybegin_i+1; else *yybegin_i; fi;
scan(start, NIL, *yybufpos, *yybufpos); # fun continue
}; # fun continue
continue; }; # fun lex
lex;
}; # fun make_lexer
};


