home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Moscow ML 1.42 / src / compiler / Lexer.sml < prev    next >
Encoding:
Text File  |  1997-08-18  |  39.1 KB  |  1,319 lines  |  [TEXT/Moml]

  1. local open Obj Lexing in
  2.  
  3.  
  4. open Fnlib Memory Config Mixture Const Parser;
  5.  
  6. (* For Quote/Antiquote --- object language embedding. *)
  7.  
  8. val quotation = ref false
  9.  
  10. datatype lexingMode =
  11.     NORMALlm
  12.   | QUOTElm
  13.   | ANTIQUOTElm
  14.  
  15. val lexingMode = ref NORMALlm
  16.  
  17. val parCount = Stack.new() : int Stack.t
  18.  
  19. fun resetLexerState() =
  20. (
  21.   lexingMode := NORMALlm;
  22.   Stack.clear parCount
  23. )
  24.  
  25. (* For nesting comments *)
  26.  
  27. val comment_depth = ref 0
  28.  
  29. (* The table of keywords *)
  30.  
  31. val keyword_table = (Hasht.new 53 : (string,token) Hasht.t)
  32.  
  33. val () =
  34. List.app (fn (str,tok) => Hasht.insert keyword_table str tok)
  35. [
  36.   ("abstraction",  ABSTRACTION),
  37.   ("abstype",      ABSTYPE),
  38.   ("and",          AND),
  39.   ("andalso",      ANDALSO),
  40.   ("as",           AS),
  41.   ("case",         CASE),
  42.   ("datatype",     DATATYPE),
  43.   ("do",           DO),
  44.   ("else",         ELSE),
  45.   ("eqtype",       EQTYPE),
  46.   ("end",          END),
  47.   ("exception",    EXCEPTION),
  48.   ("fn",           FN),
  49.   ("fun",          FUN),
  50.   ("handle",       HANDLE),
  51.   ("if",           IF),
  52.   ("in",           IN),
  53.   ("infix",        INFIX),
  54.   ("infixr",       INFIXR),
  55.   ("let",          LET),
  56.   ("local",        LOCAL),
  57.   ("nonfix",       NONFIX),
  58.   ("of",           OF),
  59.   ("op",           OP),
  60.   ("open",         OPEN),
  61.   ("orelse",       ORELSE),
  62.   ("prim_eqtype",  PRIM_EQTYPE),
  63.   ("prim_EQtype",  PRIM_REFTYPE),
  64.   ("prim_type",    PRIM_TYPE),
  65.   ("prim_val",     PRIM_VAL),
  66.   ("raise",        RAISE),
  67.   ("rec",          REC),
  68.   ("sig",          SIG),
  69.   ("signature",    SIGNATURE),
  70.   ("struct",       STRUCT),
  71.   ("structure",    STRUCTURE),
  72.   ("then",         THEN),
  73.   ("type",         TYPE),
  74.   ("val",          VAL),
  75.   ("while",        WHILE),
  76.   ("with",         WITH),
  77.   ("withtype",     WITHTYPE),
  78.   ("#",            HASH),
  79.   ("->",           ARROW),
  80.   ("|",            BAR),
  81.   (":",            COLON),
  82.   (":>",           COLONGT),
  83.   ("=>",           DARROW),
  84.   ("=",            EQUALS),
  85.   ("*",            STAR)
  86. ]
  87.  
  88. fun mkKeyword lexbuf =
  89.   let val s = getLexeme lexbuf in
  90.     Hasht.find keyword_table s
  91.     handle Subscript => ID s
  92.   end
  93.  
  94. val savedLexemeStart = ref 0
  95.  
  96. val initial_string_buffer = CharArray.array(256, #"\000")
  97. val string_buff = ref initial_string_buffer
  98. val string_index = ref 0
  99.  
  100. fun reset_string_buffer() =
  101. (
  102.   string_buff := initial_string_buffer;
  103.   string_index := 0;
  104.   ()
  105. )
  106.  
  107. fun store_string_char c =
  108.   let open CharArray
  109.       val len = length (!string_buff)
  110.   in
  111.     if !string_index >= len then
  112.       let val new_buff = array(len * 2, #"\000") in
  113.         copy
  114.           { src = !string_buff, si = 0, len = NONE, dst = new_buff, di = 0 };
  115.         string_buff := new_buff
  116.       end
  117.     else ();
  118.     update(!string_buff, !string_index, c);
  119.     incr string_index
  120.   end
  121.  
  122. fun get_stored_string() =
  123.   let open CharArray
  124.       val s = extract(!string_buff, 0, SOME (!string_index))
  125.   in
  126.     string_buff := initial_string_buffer;
  127.     s
  128.   end
  129.  
  130. fun splitQualId s =
  131.   let open CharVector
  132.       val len' = size s - 1
  133.       fun parse n =
  134.         if n >= len' then
  135.           ("", s)
  136.         else if sub(s, n) = #"." then
  137.           ( normalizedUnitName (extract(s, 0, SOME n)),
  138.             extract(s, n + 1, SOME(len' - n)) )
  139.         else
  140.           parse (n+1)
  141.   in parse 0 end
  142.  
  143. fun mkQualId lexbuf =
  144.   let val (qual, id) = splitQualId(getLexeme lexbuf) in
  145.     if id = "*" then
  146.       QUAL_STAR { qual=qual, id=id }
  147.     else
  148.       QUAL_ID   { qual=qual, id=id }
  149.   end
  150.  
  151. fun charCodeOfDecimal lexbuf i =
  152.   100 * (Char.ord(getLexemeChar lexbuf i) - 48) +
  153.    10 * (Char.ord(getLexemeChar lexbuf (i+1)) - 48) +
  154.         (Char.ord(getLexemeChar lexbuf (i+2)) - 48)
  155.  
  156. fun lexError msg lexbuf =
  157. (
  158.   resetLexerState();
  159.   raise LexicalError(msg, getLexemeStart lexbuf, getLexemeEnd lexbuf)
  160. )
  161.  
  162. fun constTooLarge msg lexbuf =
  163. (
  164.   resetLexerState();
  165.   lexError (msg ^ " constant is too large") lexbuf
  166. )
  167.  
  168. prim_val sml_word_of_string    : string -> word = 1 "sml_word_of_dec"
  169. prim_val sml_word_of_hexstring : string -> word = 1 "sml_word_of_hex"
  170.  
  171. fun notTerminated msg lexbuf =
  172. (
  173.   resetLexerState();
  174.   raise LexicalError (msg ^ " not terminated",
  175.                       !savedLexemeStart, getLexemeEnd lexbuf)
  176. )
  177.  
  178. fun skipString msg skip lexbuf =
  179.   let
  180.     val pos1 = getLexemeStart lexbuf
  181.     val pos2 = getLexemeEnd lexbuf
  182.   in
  183.     skip lexbuf;
  184.     resetLexerState();
  185.     raise (LexicalError(msg, pos1, pos2))
  186.   end
  187.  
  188. fun scanString scan lexbuf =
  189. (
  190.   reset_string_buffer();
  191.   savedLexemeStart := getLexemeStart lexbuf;
  192.   scan lexbuf;
  193.   setLexStartPos lexbuf (!savedLexemeStart - getLexAbsPos lexbuf)
  194. )
  195.  
  196.  
  197. fun action_70 lexbuf = (
  198.  case !lexingMode of
  199.             NORMALlm =>
  200.               TokenN lexbuf
  201.           | QUOTElm =>
  202.               (scanString Quotation lexbuf;
  203.                case !lexingMode of
  204.                    NORMALlm =>
  205.                      QUOTER (get_stored_string())
  206.                  | ANTIQUOTElm =>
  207.                      QUOTEM (get_stored_string())
  208.                  | QUOTElm =>
  209.                      fatalError "Token")
  210.           | ANTIQUOTElm =>
  211.               AntiQuotation lexbuf
  212.       )
  213. and action_69 lexbuf = (
  214.  lexError "this will be never called!" lexbuf )
  215. and action_68 lexbuf = (
  216.  if !quotation then TokenIdQ lexbuf else TokenId lexbuf )
  217. and action_67 lexbuf = (
  218.  EOF )
  219. and action_66 lexbuf = (
  220.  SEMICOLON )
  221. and action_65 lexbuf = (
  222.  if not(Stack.null parCount) then
  223.           let val count = Stack.pop parCount - 1 in
  224.             if count = 0 then
  225.               (lexingMode := QUOTElm; Token lexbuf)
  226.             else
  227.               (Stack.push count parCount; RPAREN)
  228.           end
  229.         else
  230.           RPAREN
  231.       )
  232. and action_64 lexbuf = (
  233.  if not(Stack.null parCount) then
  234.          Stack.push (Stack.pop parCount + 1) parCount
  235.        else ();
  236.        LPAREN
  237.      )
  238. and action_63 lexbuf = (
  239.  RBRACKET )
  240. and action_62 lexbuf = (
  241.  HASHLBRACKET )
  242. and action_61 lexbuf = (
  243.  LBRACKET )
  244. and action_60 lexbuf = (
  245.  RBRACE )
  246. and action_59 lexbuf = (
  247.  LBRACE )
  248. and action_58 lexbuf = (
  249.  DOTDOTDOT )
  250. and action_57 lexbuf = (
  251.  COMMA )
  252. and action_56 lexbuf = (
  253.  UNDERBAR )
  254. and action_55 lexbuf = (
  255.  scanString String lexbuf;
  256.         let val s = get_stored_string() in
  257.           if size s <> 1 then
  258.             lexError "ill-formed character constant" lexbuf
  259.           else ();
  260.           CHAR (CharVector.sub(s, 0))
  261.         end )
  262. and action_54 lexbuf = (
  263.  scanString String lexbuf;
  264.         STRING (get_stored_string())
  265.       )
  266. and action_53 lexbuf = (
  267.  REAL (sml_float_of_string (getLexeme lexbuf))
  268.                   handle Fail _ => constTooLarge "real" lexbuf
  269.                 )
  270. and action_52 lexbuf = (
  271.  WORD (sml_word_of_hexstring(getLexeme lexbuf))
  272.                   handle Fail _ => constTooLarge "word" lexbuf
  273.                 )
  274. and action_51 lexbuf = (
  275.  WORD (sml_word_of_string(getLexeme lexbuf))
  276.                   handle Fail _ => constTooLarge "word" lexbuf
  277.                 )
  278. and action_50 lexbuf = (
  279.  NEGINT    (sml_hex_of_string(getLexeme lexbuf))
  280.                   handle Fail _ => constTooLarge "integer" lexbuf
  281.                 )
  282. and action_49 lexbuf = (
  283.  NEGINT    (sml_int_of_string(getLexeme lexbuf))
  284.                   handle Fail _ => constTooLarge "integer" lexbuf
  285.                 )
  286. and action_48 lexbuf = (
  287.  NZPOSINT2 (sml_int_of_string(getLexeme lexbuf))
  288.                   handle Fail _ => constTooLarge "integer" lexbuf
  289.                 )
  290. and action_47 lexbuf = (
  291.  ZPOSINT2  (sml_int_of_string(getLexeme lexbuf))
  292.                   handle Fail _ => constTooLarge "integer" lexbuf
  293.                 )
  294. and action_46 lexbuf = (
  295.  NZDIGIT   (sml_int_of_string(getLexeme lexbuf)) )
  296. and action_45 lexbuf = (
  297.  ZDIGIT 0 )
  298. and action_44 lexbuf = (
  299.  TYVAR   (getLexeme lexbuf) )
  300. and action_43 lexbuf = (
  301.  lexError "unmatched comment bracket" lexbuf )
  302. and action_42 lexbuf = (
  303.  savedLexemeStart := getLexemeStart lexbuf;
  304.         comment_depth := 1; Comment lexbuf; TokenN lexbuf
  305.       )
  306. and action_41 lexbuf = (
  307.  TokenN lexbuf )
  308. and action_40 lexbuf = (
  309.  lexError "ill-formed token" lexbuf )
  310. and action_39 lexbuf = (
  311.  mkQualId lexbuf )
  312. and action_38 lexbuf = (
  313.  mkKeyword lexbuf )
  314. and action_37 lexbuf = (
  315.  lexError "ill-formed token" lexbuf )
  316. and action_36 lexbuf = (
  317.  lexingMode := QUOTElm; QUOTEL )
  318. and action_35 lexbuf = (
  319.  mkQualId lexbuf )
  320. and action_34 lexbuf = (
  321.  mkKeyword lexbuf )
  322. and action_33 lexbuf = (
  323.  Comment lexbuf )
  324. and action_32 lexbuf = (
  325.  notTerminated "comment" lexbuf )
  326. and action_31 lexbuf = (
  327.  (decr comment_depth;
  328.          if !comment_depth > 0 then Comment lexbuf else ()) )
  329. and action_30 lexbuf = (
  330.  (incr comment_depth; Comment lexbuf) )
  331. and action_29 lexbuf = (
  332.  (store_string_char(getLexemeChar lexbuf 0);
  333.          String lexbuf) )
  334. and action_28 lexbuf = (
  335.  skipString "invalid character in string" SkipString lexbuf )
  336. and action_27 lexbuf = (
  337.  skipString "newline not permitted in string" SkipString lexbuf )
  338. and action_26 lexbuf = (
  339.  notTerminated "string" lexbuf )
  340. and action_25 lexbuf = (
  341.  skipString "ill-formed escape sequence" SkipString lexbuf )
  342. and action_24 lexbuf = (
  343.  let val code = charCodeOfDecimal lexbuf 1 in
  344.           if code >= 256 then
  345.             skipString "character code is too large" SkipString lexbuf
  346.           else ();
  347.           store_string_char(Char.chr code);
  348.           String lexbuf
  349.         end )
  350. and action_23 lexbuf = (
  351.  store_string_char(
  352.           Char.chr(Char.ord(getLexemeChar lexbuf 2) - 64));
  353.         String lexbuf )
  354. and action_22 lexbuf = (
  355.  String lexbuf )
  356. and action_21 lexbuf = (
  357.  store_string_char(char_for_backslash(getLexemeChar lexbuf 1));
  358.         String lexbuf )
  359. and action_20 lexbuf = (
  360.  () )
  361. and action_19 lexbuf = (
  362.  SkipString lexbuf )
  363. and action_18 lexbuf = (
  364.  notTerminated "string" lexbuf )
  365. and action_17 lexbuf = (
  366.  SkipString lexbuf )
  367. and action_16 lexbuf = (
  368.  SkipString lexbuf )
  369. and action_15 lexbuf = (
  370.  () )
  371. and action_14 lexbuf = (
  372.  (store_string_char(getLexemeChar lexbuf 0);
  373.          Quotation lexbuf) )
  374. and action_13 lexbuf = (
  375.  skipString "invalid character in quotation" SkipQuotation lexbuf )
  376. and action_12 lexbuf = (
  377.  lexingMode := NORMALlm;
  378.         notTerminated "quotation" lexbuf
  379.       )
  380. and action_11 lexbuf = (
  381.  (store_string_char(getLexemeChar lexbuf 0);
  382.          Quotation lexbuf) )
  383. and action_10 lexbuf = (
  384.  Quotation lexbuf )
  385. and action_9 lexbuf = (
  386.  lexingMode := ANTIQUOTElm )
  387. and action_8 lexbuf = (
  388.  lexingMode := NORMALlm )
  389. and action_7 lexbuf = (
  390.  SkipQuotation lexbuf )
  391. and action_6 lexbuf = (
  392.  lexingMode := NORMALlm;
  393.         notTerminated "quotation" lexbuf
  394.       )
  395. and action_5 lexbuf = (
  396.  lexingMode := NORMALlm )
  397. and action_4 lexbuf = (
  398.  lexingMode := QUOTElm;
  399.         lexError "ill-formed antiquotation" lexbuf
  400.       )
  401. and action_3 lexbuf = (
  402.  lexingMode := NORMALlm;
  403.         notTerminated "antiquotation" lexbuf
  404.       )
  405. and action_2 lexbuf = (
  406.  lexingMode := NORMALlm;
  407.         lexError "antiquotation is missing" lexbuf
  408.       )
  409. and action_1 lexbuf = (
  410.  Stack.push 1 parCount; lexingMode := NORMALlm;
  411.         TokenN lexbuf
  412.       )
  413. and action_0 lexbuf = (
  414.  lexingMode := QUOTElm;
  415.         mkKeyword lexbuf
  416.       )
  417. and state_0 lexbuf = (
  418.  let val currChar = getNextChar lexbuf in
  419.  if currChar >= #"A" andalso currChar <= #"Z" then  state_115 lexbuf
  420.  else if currChar >= #"a" andalso currChar <= #"z" then  state_115 lexbuf
  421.  else case currChar of
  422.     #"!" => state_113 lexbuf
  423.  |  #"&" => state_113 lexbuf
  424.  |  #"%" => state_113 lexbuf
  425.  |  #"$" => state_113 lexbuf
  426.  |  #"#" => state_113 lexbuf
  427.  |  #"+" => state_113 lexbuf
  428.  |  #"*" => state_113 lexbuf
  429.  |  #"-" => state_113 lexbuf
  430.  |  #"/" => state_113 lexbuf
  431.  |  #":" => state_113 lexbuf
  432.  |  #"@" => state_113 lexbuf
  433.  |  #"?" => state_113 lexbuf
  434.  |  #">" => state_113 lexbuf
  435.  |  #"=" => state_113 lexbuf
  436.  |  #"<" => state_113 lexbuf
  437.  |  #"\\" => state_113 lexbuf
  438.  |  #"|" => state_113 lexbuf
  439.  |  #"~" => state_113 lexbuf
  440.  |  #"`" => action_2 lexbuf
  441.  |  #"(" => action_1 lexbuf
  442.  |  #"\^Z" => action_3 lexbuf
  443.  |  #"\^@" => action_3 lexbuf
  444.  |  _ => action_4 lexbuf
  445.  end)
  446. and state_1 lexbuf = (
  447.  let val currChar = getNextChar lexbuf in
  448.  case currChar of
  449.     #"`" => action_5 lexbuf
  450.  |  #"\^Z" => action_6 lexbuf
  451.  |  #"\^@" => action_6 lexbuf
  452.  |  _ => action_7 lexbuf
  453.  end)
  454. and state_2 lexbuf = (
  455.  let val currChar = getNextChar lexbuf in
  456.  if currChar >= #"\^A" andalso currChar <= #"\b" then  action_13 lexbuf
  457.  else if currChar >= #"\^N" andalso currChar <= #"\^Y" then  action_13 lexbuf
  458.  else case currChar of
  459.     #"\f" => action_13 lexbuf
  460.  |  #"\v" => action_13 lexbuf
  461.  |  #"\127" => action_13 lexbuf
  462.  |  #"\255" => action_13 lexbuf
  463.  |  #"\r" => action_11 lexbuf
  464.  |  #"\t" => action_11 lexbuf
  465.  |  #"`" => action_8 lexbuf
  466.  |  #"^" => action_9 lexbuf
  467.  |  #"\^Z" => action_12 lexbuf
  468.  |  #"\n" => action_10 lexbuf
  469.  |  #"\^@" => action_12 lexbuf
  470.  |  _ => action_14 lexbuf
  471.  end)
  472. and state_3 lexbuf = (
  473.  let val currChar = getNextChar lexbuf in
  474.  case currChar of
  475.     #"\\" => state_94 lexbuf
  476.  |  #"\"" => action_15 lexbuf
  477.  |  #"\^Z" => action_18 lexbuf
  478.  |  #"\^@" => action_18 lexbuf
  479.  |  _ => action_19 lexbuf
  480.  end)
  481. and state_4 lexbuf = (
  482.  let val currChar = getNextChar lexbuf in
  483.  if currChar >= #"\^A" andalso currChar <= #"\t" then  action_28 lexbuf
  484.  else if currChar >= #"\^N" andalso currChar <= #"\^Y" then  action_28 lexbuf
  485.  else case currChar of
  486.     #"\f" => action_28 lexbuf
  487.  |  #"\v" => action_28 lexbuf
  488.  |  #"\127" => action_28 lexbuf
  489.  |  #"\255" => action_28 lexbuf
  490.  |  #"\r" => action_27 lexbuf
  491.  |  #"\n" => action_27 lexbuf
  492.  |  #"\\" => state_81 lexbuf
  493.  |  #"\"" => action_20 lexbuf
  494.  |  #"\^Z" => action_26 lexbuf
  495.  |  #"\^@" => action_26 lexbuf
  496.  |  _ => action_29 lexbuf
  497.  end)
  498. and state_5 lexbuf = (
  499.  let val currChar = getNextChar lexbuf in
  500.  case currChar of
  501.     #"*" => state_72 lexbuf
  502.  |  #"(" => state_71 lexbuf
  503.  |  #"\^Z" => action_32 lexbuf
  504.  |  #"\^@" => action_32 lexbuf
  505.  |  _ => action_33 lexbuf
  506.  end)
  507. and state_6 lexbuf = (
  508.  let val currChar = getNextChar lexbuf in
  509.  if currChar >= #"A" andalso currChar <= #"Z" then  state_61 lexbuf
  510.  else if currChar >= #"a" andalso currChar <= #"z" then  state_61 lexbuf
  511.  else case currChar of
  512.     #"!" => state_60 lexbuf
  513.  |  #"&" => state_60 lexbuf
  514.  |  #"%" => state_60 lexbuf
  515.  |  #"$" => state_60 lexbuf
  516.  |  #"#" => state_60 lexbuf
  517.  |  #"+" => state_60 lexbuf
  518.  |  #"*" => state_60 lexbuf
  519.  |  #"-" => state_60 lexbuf
  520.  |  #"/" => state_60 lexbuf
  521.  |  #":" => state_60 lexbuf
  522.  |  #"@" => state_60 lexbuf
  523.  |  #"?" => state_60 lexbuf
  524.  |  #">" => state_60 lexbuf
  525.  |  #"=" => state_60 lexbuf
  526.  |  #"<" => state_60 lexbuf
  527.  |  #"\\" => state_60 lexbuf
  528.  |  #"^" => state_60 lexbuf
  529.  |  #"|" => state_60 lexbuf
  530.  |  #"~" => state_60 lexbuf
  531.  |  #"`" => action_36 lexbuf
  532.  |  #"\^@" => backtrack lexbuf
  533.  |  _ => action_37 lexbuf
  534.  end)
  535. and state_7 lexbuf = (
  536.  let val currChar = getNextChar lexbuf in
  537.  if currChar >= #"A" andalso currChar <= #"Z" then  state_53 lexbuf
  538.  else if currChar >= #"a" andalso currChar <= #"z" then  state_53 lexbuf
  539.  else case currChar of
  540.     #"!" => state_52 lexbuf
  541.  |  #"&" => state_52 lexbuf
  542.  |  #"%" => state_52 lexbuf
  543.  |  #"$" => state_52 lexbuf
  544.  |  #"#" => state_52 lexbuf
  545.  |  #"+" => state_52 lexbuf
  546.  |  #"*" => state_52 lexbuf
  547.  |  #"-" => state_52 lexbuf
  548.  |  #"/" => state_52 lexbuf
  549.  |  #":" => state_52 lexbuf
  550.  |  #"@" => state_52 lexbuf
  551.  |  #"?" => state_52 lexbuf
  552.  |  #">" => state_52 lexbuf
  553.  |  #"=" => state_52 lexbuf
  554.  |  #"<" => state_52 lexbuf
  555.  |  #"\\" => state_52 lexbuf
  556.  |  #"^" => state_52 lexbuf
  557.  |  #"`" => state_52 lexbuf
  558.  |  #"|" => state_52 lexbuf
  559.  |  #"~" => state_52 lexbuf
  560.  |  #"\^@" => backtrack lexbuf
  561.  |  _ => action_40 lexbuf
  562.  end)
  563. and state_8 lexbuf = (
  564.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  565.  setLexLastAction lexbuf (magic action_68);
  566.  let val currChar = getNextChar lexbuf in
  567.  if currChar >= #"1" andalso currChar <= #"9" then  state_21 lexbuf
  568.  else case currChar of
  569.     #"\r" => action_41 lexbuf
  570.  |  #"\t" => action_41 lexbuf
  571.  |  #"\n" => action_41 lexbuf
  572.  |  #"\f" => action_41 lexbuf
  573.  |  #" " => action_41 lexbuf
  574.  |  #"\^@" => action_67 lexbuf
  575.  |  #"\^Z" => action_67 lexbuf
  576.  |  #"~" => state_28 lexbuf
  577.  |  #"}" => action_60 lexbuf
  578.  |  #"{" => action_59 lexbuf
  579.  |  #"_" => action_56 lexbuf
  580.  |  #"]" => action_63 lexbuf
  581.  |  #"[" => action_61 lexbuf
  582.  |  #";" => action_66 lexbuf
  583.  |  #"0" => state_20 lexbuf
  584.  |  #"." => state_19 lexbuf
  585.  |  #"," => action_57 lexbuf
  586.  |  #"*" => state_17 lexbuf
  587.  |  #")" => action_65 lexbuf
  588.  |  #"(" => state_15 lexbuf
  589.  |  #"'" => state_14 lexbuf
  590.  |  #"#" => state_13 lexbuf
  591.  |  #"\"" => action_54 lexbuf
  592.  |  _ => backtrack lexbuf
  593.  end)
  594. and state_9 lexbuf = (
  595.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  596.  setLexLastAction lexbuf (magic action_70);
  597.  let val currChar = getNextChar lexbuf in
  598.  case currChar of
  599.     _ => backtrack lexbuf
  600.  end)
  601. and state_13 lexbuf = (
  602.  let val currChar = getNextChar lexbuf in
  603.  case currChar of
  604.     #"[" => action_62 lexbuf
  605.  |  #"\"" => action_55 lexbuf
  606.  |  _ => backtrack lexbuf
  607.  end)
  608. and state_14 lexbuf = (
  609.  let val currChar = getNextChar lexbuf in
  610.  if currChar >= #"0" andalso currChar <= #"9" then  state_48 lexbuf
  611.  else if currChar >= #"A" andalso currChar <= #"Z" then  state_48 lexbuf
  612.  else if currChar >= #"a" andalso currChar <= #"z" then  state_48 lexbuf
  613.  else case currChar of
  614.     #"'" => state_48 lexbuf
  615.  |  #"_" => state_48 lexbuf
  616.  |  _ => backtrack lexbuf
  617.  end)
  618. and state_15 lexbuf = (
  619.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  620.  setLexLastAction lexbuf (magic action_64);
  621.  let val currChar = getNextChar lexbuf in
  622.  case currChar of
  623.     #"*" => action_42 lexbuf
  624.  |  _ => backtrack lexbuf
  625.  end)
  626. and state_17 lexbuf = (
  627.  let val currChar = getNextChar lexbuf in
  628.  case currChar of
  629.     #")" => action_43 lexbuf
  630.  |  _ => backtrack lexbuf
  631.  end)
  632. and state_19 lexbuf = (
  633.  let val currChar = getNextChar lexbuf in
  634.  case currChar of
  635.     #"." => state_44 lexbuf
  636.  |  _ => backtrack lexbuf
  637.  end)
  638. and state_20 lexbuf = (
  639.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  640.  setLexLastAction lexbuf (magic action_45);
  641.  let val currChar = getNextChar lexbuf in
  642.  if currChar >= #"0" andalso currChar <= #"9" then  state_39 lexbuf
  643.  else case currChar of
  644.     #"E" => state_32 lexbuf
  645.  |  #"e" => state_32 lexbuf
  646.  |  #"x" => state_36 lexbuf
  647.  |  #"w" => state_40 lexbuf
  648.  |  #"." => state_31 lexbuf
  649.  |  _ => backtrack lexbuf
  650.  end)
  651. and state_21 lexbuf = (
  652.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  653.  setLexLastAction lexbuf (magic action_46);
  654.  let val currChar = getNextChar lexbuf in
  655.  if currChar >= #"0" andalso currChar <= #"9" then  state_38 lexbuf
  656.  else case currChar of
  657.     #"E" => state_32 lexbuf
  658.  |  #"e" => state_32 lexbuf
  659.  |  #"." => state_31 lexbuf
  660.  |  _ => backtrack lexbuf
  661.  end)
  662. and state_28 lexbuf = (
  663.  let val currChar = getNextChar lexbuf in
  664.  if currChar >= #"1" andalso currChar <= #"9" then  state_30 lexbuf
  665.  else case currChar of
  666.     #"0" => state_29 lexbuf
  667.  |  _ => backtrack lexbuf
  668.  end)
  669. and state_29 lexbuf = (
  670.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  671.  setLexLastAction lexbuf (magic action_49);
  672.  let val currChar = getNextChar lexbuf in
  673.  if currChar >= #"0" andalso currChar <= #"9" then  state_30 lexbuf
  674.  else case currChar of
  675.     #"E" => state_32 lexbuf
  676.  |  #"e" => state_32 lexbuf
  677.  |  #"x" => state_36 lexbuf
  678.  |  #"." => state_31 lexbuf
  679.  |  _ => backtrack lexbuf
  680.  end)
  681. and state_30 lexbuf = (
  682.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  683.  setLexLastAction lexbuf (magic action_49);
  684.  let val currChar = getNextChar lexbuf in
  685.  if currChar >= #"0" andalso currChar <= #"9" then  state_30 lexbuf
  686.  else case currChar of
  687.     #"E" => state_32 lexbuf
  688.  |  #"e" => state_32 lexbuf
  689.  |  #"." => state_31 lexbuf
  690.  |  _ => backtrack lexbuf
  691.  end)
  692. and state_31 lexbuf = (
  693.  let val currChar = getNextChar lexbuf in
  694.  if currChar >= #"0" andalso currChar <= #"9" then  state_35 lexbuf
  695.  else backtrack lexbuf
  696.  end)
  697. and state_32 lexbuf = (
  698.  let val currChar = getNextChar lexbuf in
  699.  if currChar >= #"0" andalso currChar <= #"9" then  state_33 lexbuf
  700.  else case currChar of
  701.     #"~" => state_34 lexbuf
  702.  |  _ => backtrack lexbuf
  703.  end)
  704. and state_33 lexbuf = (
  705.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  706.  setLexLastAction lexbuf (magic action_53);
  707.  let val currChar = getNextChar lexbuf in
  708.  if currChar >= #"0" andalso currChar <= #"9" then  state_33 lexbuf
  709.  else backtrack lexbuf
  710.  end)
  711. and state_34 lexbuf = (
  712.  let val currChar = getNextChar lexbuf in
  713.  if currChar >= #"0" andalso currChar <= #"9" then  state_33 lexbuf
  714.  else backtrack lexbuf
  715.  end)
  716. and state_35 lexbuf = (
  717.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  718.  setLexLastAction lexbuf (magic action_53);
  719.  let val currChar = getNextChar lexbuf in
  720.  if currChar >= #"0" andalso currChar <= #"9" then  state_35 lexbuf
  721.  else case currChar of
  722.     #"E" => state_32 lexbuf
  723.  |  #"e" => state_32 lexbuf
  724.  |  _ => backtrack lexbuf
  725.  end)
  726. and state_36 lexbuf = (
  727.  let val currChar = getNextChar lexbuf in
  728.  if currChar >= #"0" andalso currChar <= #"9" then  state_37 lexbuf
  729.  else if currChar >= #"A" andalso currChar <= #"F" then  state_37 lexbuf
  730.  else if currChar >= #"a" andalso currChar <= #"f" then  state_37 lexbuf
  731.  else backtrack lexbuf
  732.  end)
  733. and state_37 lexbuf = (
  734.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  735.  setLexLastAction lexbuf (magic action_50);
  736.  let val currChar = getNextChar lexbuf in
  737.  if currChar >= #"0" andalso currChar <= #"9" then  state_37 lexbuf
  738.  else if currChar >= #"A" andalso currChar <= #"F" then  state_37 lexbuf
  739.  else if currChar >= #"a" andalso currChar <= #"f" then  state_37 lexbuf
  740.  else backtrack lexbuf
  741.  end)
  742. and state_38 lexbuf = (
  743.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  744.  setLexLastAction lexbuf (magic action_48);
  745.  let val currChar = getNextChar lexbuf in
  746.  if currChar >= #"0" andalso currChar <= #"9" then  state_38 lexbuf
  747.  else case currChar of
  748.     #"E" => state_32 lexbuf
  749.  |  #"e" => state_32 lexbuf
  750.  |  #"." => state_31 lexbuf
  751.  |  _ => backtrack lexbuf
  752.  end)
  753. and state_39 lexbuf = (
  754.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  755.  setLexLastAction lexbuf (magic action_47);
  756.  let val currChar = getNextChar lexbuf in
  757.  if currChar >= #"0" andalso currChar <= #"9" then  state_39 lexbuf
  758.  else case currChar of
  759.     #"E" => state_32 lexbuf
  760.  |  #"e" => state_32 lexbuf
  761.  |  #"." => state_31 lexbuf
  762.  |  _ => backtrack lexbuf
  763.  end)
  764. and state_40 lexbuf = (
  765.  let val currChar = getNextChar lexbuf in
  766.  if currChar >= #"0" andalso currChar <= #"9" then  state_41 lexbuf
  767.  else case currChar of
  768.     #"x" => state_42 lexbuf
  769.  |  _ => backtrack lexbuf
  770.  end)
  771. and state_41 lexbuf = (
  772.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  773.  setLexLastAction lexbuf (magic action_51);
  774.  let val currChar = getNextChar lexbuf in
  775.  if currChar >= #"0" andalso currChar <= #"9" then  state_41 lexbuf
  776.  else backtrack lexbuf
  777.  end)
  778. and state_42 lexbuf = (
  779.  let val currChar = getNextChar lexbuf in
  780.  if currChar >= #"0" andalso currChar <= #"9" then  state_43 lexbuf
  781.  else if currChar >= #"A" andalso currChar <= #"F" then  state_43 lexbuf
  782.  else if currChar >= #"a" andalso currChar <= #"f" then  state_43 lexbuf
  783.  else backtrack lexbuf
  784.  end)
  785. and state_43 lexbuf = (
  786.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  787.  setLexLastAction lexbuf (magic action_52);
  788.  let val currChar = getNextChar lexbuf in
  789.  if currChar >= #"0" andalso currChar <= #"9" then  state_43 lexbuf
  790.  else if currChar >= #"A" andalso currChar <= #"F" then  state_43 lexbuf
  791.  else if currChar >= #"a" andalso currChar <= #"f" then  state_43 lexbuf
  792.  else backtrack lexbuf
  793.  end)
  794. and state_44 lexbuf = (
  795.  let val currChar = getNextChar lexbuf in
  796.  case currChar of
  797.     #"." => action_58 lexbuf
  798.  |  _ => backtrack lexbuf
  799.  end)
  800. and state_48 lexbuf = (
  801.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  802.  setLexLastAction lexbuf (magic action_44);
  803.  let val currChar = getNextChar lexbuf in
  804.  if currChar >= #"0" andalso currChar <= #"9" then  state_48 lexbuf
  805.  else if currChar >= #"A" andalso currChar <= #"Z" then  state_48 lexbuf
  806.  else if currChar >= #"a" andalso currChar <= #"z" then  state_48 lexbuf
  807.  else case currChar of
  808.     #"'" => state_48 lexbuf
  809.  |  #"_" => state_48 lexbuf
  810.  |  _ => backtrack lexbuf
  811.  end)
  812. and state_52 lexbuf = (
  813.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  814.  setLexLastAction lexbuf (magic action_38);
  815.  let val currChar = getNextChar lexbuf in
  816.  case currChar of
  817.     #"!" => state_58 lexbuf
  818.  |  #"&" => state_58 lexbuf
  819.  |  #"%" => state_58 lexbuf
  820.  |  #"$" => state_58 lexbuf
  821.  |  #"#" => state_58 lexbuf
  822.  |  #"+" => state_58 lexbuf
  823.  |  #"*" => state_58 lexbuf
  824.  |  #"-" => state_58 lexbuf
  825.  |  #"/" => state_58 lexbuf
  826.  |  #":" => state_58 lexbuf
  827.  |  #"@" => state_58 lexbuf
  828.  |  #"?" => state_58 lexbuf
  829.  |  #">" => state_58 lexbuf
  830.  |  #"=" => state_58 lexbuf
  831.  |  #"<" => state_58 lexbuf
  832.  |  #"\\" => state_58 lexbuf
  833.  |  #"^" => state_58 lexbuf
  834.  |  #"`" => state_58 lexbuf
  835.  |  #"|" => state_58 lexbuf
  836.  |  #"~" => state_58 lexbuf
  837.  |  #"." => state_55 lexbuf
  838.  |  _ => backtrack lexbuf
  839.  end)
  840. and state_53 lexbuf = (
  841.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  842.  setLexLastAction lexbuf (magic action_38);
  843.  let val currChar = getNextChar lexbuf in
  844.  if currChar >= #"0" andalso currChar <= #"9" then  state_54 lexbuf
  845.  else if currChar >= #"A" andalso currChar <= #"Z" then  state_54 lexbuf
  846.  else if currChar >= #"a" andalso currChar <= #"z" then  state_54 lexbuf
  847.  else case currChar of
  848.     #"'" => state_54 lexbuf
  849.  |  #"_" => state_54 lexbuf
  850.  |  #"." => state_55 lexbuf
  851.  |  _ => backtrack lexbuf
  852.  end)
  853. and state_54 lexbuf = (
  854.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  855.  setLexLastAction lexbuf (magic action_38);
  856.  let val currChar = getNextChar lexbuf in
  857.  if currChar >= #"0" andalso currChar <= #"9" then  state_54 lexbuf
  858.  else if currChar >= #"A" andalso currChar <= #"Z" then  state_54 lexbuf
  859.  else if currChar >= #"a" andalso currChar <= #"z" then  state_54 lexbuf
  860.  else case currChar of
  861.     #"'" => state_54 lexbuf
  862.  |  #"_" => state_54 lexbuf
  863.  |  #"." => state_55 lexbuf
  864.  |  _ => backtrack lexbuf
  865.  end)
  866. and state_55 lexbuf = (
  867.  let val currChar = getNextChar lexbuf in
  868.  if currChar >= #"A" andalso currChar <= #"Z" then  state_57 lexbuf
  869.  else if currChar >= #"a" andalso currChar <= #"z" then  state_57 lexbuf
  870.  else case currChar of
  871.     #"!" => state_56 lexbuf
  872.  |  #"&" => state_56 lexbuf
  873.  |  #"%" => state_56 lexbuf
  874.  |  #"$" => state_56 lexbuf
  875.  |  #"#" => state_56 lexbuf
  876.  |  #"+" => state_56 lexbuf
  877.  |  #"*" => state_56 lexbuf
  878.  |  #"-" => state_56 lexbuf
  879.  |  #"/" => state_56 lexbuf
  880.  |  #":" => state_56 lexbuf
  881.  |  #"@" => state_56 lexbuf
  882.  |  #"?" => state_56 lexbuf
  883.  |  #">" => state_56 lexbuf
  884.  |  #"=" => state_56 lexbuf
  885.  |  #"<" => state_56 lexbuf
  886.  |  #"\\" => state_56 lexbuf
  887.  |  #"^" => state_56 lexbuf
  888.  |  #"`" => state_56 lexbuf
  889.  |  #"|" => state_56 lexbuf
  890.  |  #"~" => state_56 lexbuf
  891.  |  _ => backtrack lexbuf
  892.  end)
  893. and state_56 lexbuf = (
  894.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  895.  setLexLastAction lexbuf (magic action_39);
  896.  let val currChar = getNextChar lexbuf in
  897.  case currChar of
  898.     #"!" => state_56 lexbuf
  899.  |  #"&" => state_56 lexbuf
  900.  |  #"%" => state_56 lexbuf
  901.  |  #"$" => state_56 lexbuf
  902.  |  #"#" => state_56 lexbuf
  903.  |  #"+" => state_56 lexbuf
  904.  |  #"*" => state_56 lexbuf
  905.  |  #"-" => state_56 lexbuf
  906.  |  #"/" => state_56 lexbuf
  907.  |  #":" => state_56 lexbuf
  908.  |  #"@" => state_56 lexbuf
  909.  |  #"?" => state_56 lexbuf
  910.  |  #">" => state_56 lexbuf
  911.  |  #"=" => state_56 lexbuf
  912.  |  #"<" => state_56 lexbuf
  913.  |  #"\\" => state_56 lexbuf
  914.  |  #"^" => state_56 lexbuf
  915.  |  #"`" => state_56 lexbuf
  916.  |  #"|" => state_56 lexbuf
  917.  |  #"~" => state_56 lexbuf
  918.  |  _ => backtrack lexbuf
  919.  end)
  920. and state_57 lexbuf = (
  921.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  922.  setLexLastAction lexbuf (magic action_39);
  923.  let val currChar = getNextChar lexbuf in
  924.  if currChar >= #"0" andalso currChar <= #"9" then  state_57 lexbuf
  925.  else if currChar >= #"A" andalso currChar <= #"Z" then  state_57 lexbuf
  926.  else if currChar >= #"a" andalso currChar <= #"z" then  state_57 lexbuf
  927.  else case currChar of
  928.     #"'" => state_57 lexbuf
  929.  |  #"_" => state_57 lexbuf
  930.  |  _ => backtrack lexbuf
  931.  end)
  932. and state_58 lexbuf = (
  933.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  934.  setLexLastAction lexbuf (magic action_38);
  935.  let val currChar = getNextChar lexbuf in
  936.  case currChar of
  937.     #"!" => state_58 lexbuf
  938.  |  #"&" => state_58 lexbuf
  939.  |  #"%" => state_58 lexbuf
  940.  |  #"$" => state_58 lexbuf
  941.  |  #"#" => state_58 lexbuf
  942.  |  #"+" => state_58 lexbuf
  943.  |  #"*" => state_58 lexbuf
  944.  |  #"-" => state_58 lexbuf
  945.  |  #"/" => state_58 lexbuf
  946.  |  #":" => state_58 lexbuf
  947.  |  #"@" => state_58 lexbuf
  948.  |  #"?" => state_58 lexbuf
  949.  |  #">" => state_58 lexbuf
  950.  |  #"=" => state_58 lexbuf
  951.  |  #"<" => state_58 lexbuf
  952.  |  #"\\" => state_58 lexbuf
  953.  |  #"^" => state_58 lexbuf
  954.  |  #"`" => state_58 lexbuf
  955.  |  #"|" => state_58 lexbuf
  956.  |  #"~" => state_58 lexbuf
  957.  |  #"." => state_55 lexbuf
  958.  |  _ => backtrack lexbuf
  959.  end)
  960. and state_60 lexbuf = (
  961.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  962.  setLexLastAction lexbuf (magic action_34);
  963.  let val currChar = getNextChar lexbuf in
  964.  case currChar of
  965.     #"!" => state_67 lexbuf
  966.  |  #"&" => state_67 lexbuf
  967.  |  #"%" => state_67 lexbuf
  968.  |  #"$" => state_67 lexbuf
  969.  |  #"#" => state_67 lexbuf
  970.  |  #"+" => state_67 lexbuf
  971.  |  #"*" => state_67 lexbuf
  972.  |  #"-" => state_67 lexbuf
  973.  |  #"/" => state_67 lexbuf
  974.  |  #":" => state_67 lexbuf
  975.  |  #"@" => state_67 lexbuf
  976.  |  #"?" => state_67 lexbuf
  977.  |  #">" => state_67 lexbuf
  978.  |  #"=" => state_67 lexbuf
  979.  |  #"<" => state_67 lexbuf
  980.  |  #"\\" => state_67 lexbuf
  981.  |  #"^" => state_67 lexbuf
  982.  |  #"|" => state_67 lexbuf
  983.  |  #"~" => state_67 lexbuf
  984.  |  #"." => state_64 lexbuf
  985.  |  _ => backtrack lexbuf
  986.  end)
  987. and state_61 lexbuf = (
  988.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  989.  setLexLastAction lexbuf (magic action_34);
  990.  let val currChar = getNextChar lexbuf in
  991.  if currChar >= #"0" andalso currChar <= #"9" then  state_63 lexbuf
  992.  else if currChar >= #"A" andalso currChar <= #"Z" then  state_63 lexbuf
  993.  else if currChar >= #"a" andalso currChar <= #"z" then  state_63 lexbuf
  994.  else case currChar of
  995.     #"'" => state_63 lexbuf
  996.  |  #"_" => state_63 lexbuf
  997.  |  #"." => state_64 lexbuf
  998.  |  _ => backtrack lexbuf
  999.  end)
  1000. and state_63 lexbuf = (
  1001.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  1002.  setLexLastAction lexbuf (magic action_34);
  1003.  let val currChar = getNextChar lexbuf in
  1004.  if currChar >= #"0" andalso currChar <= #"9" then  state_63 lexbuf
  1005.  else if currChar >= #"A" andalso currChar <= #"Z" then  state_63 lexbuf
  1006.  else if currChar >= #"a" andalso currChar <= #"z" then  state_63 lexbuf
  1007.  else case currChar of
  1008.     #"'" => state_63 lexbuf
  1009.  |  #"_" => state_63 lexbuf
  1010.  |  #"." => state_64 lexbuf
  1011.  |  _ => backtrack lexbuf
  1012.  end)
  1013. and state_64 lexbuf = (
  1014.  let val currChar = getNextChar lexbuf in
  1015.  if currChar >= #"A" andalso currChar <= #"Z" then  state_66 lexbuf
  1016.  else if currChar >= #"a" andalso currChar <= #"z" then  state_66 lexbuf
  1017.  else case currChar of
  1018.     #"!" => state_65 lexbuf
  1019.  |  #"&" => state_65 lexbuf
  1020.  |  #"%" => state_65 lexbuf
  1021.  |  #"$" => state_65 lexbuf
  1022.  |  #"#" => state_65 lexbuf
  1023.  |  #"+" => state_65 lexbuf
  1024.  |  #"*" => state_65 lexbuf
  1025.  |  #"-" => state_65 lexbuf
  1026.  |  #"/" => state_65 lexbuf
  1027.  |  #":" => state_65 lexbuf
  1028.  |  #"@" => state_65 lexbuf
  1029.  |  #"?" => state_65 lexbuf
  1030.  |  #">" => state_65 lexbuf
  1031.  |  #"=" => state_65 lexbuf
  1032.  |  #"<" => state_65 lexbuf
  1033.  |  #"\\" => state_65 lexbuf
  1034.  |  #"^" => state_65 lexbuf
  1035.  |  #"|" => state_65 lexbuf
  1036.  |  #"~" => state_65 lexbuf
  1037.  |  _ => backtrack lexbuf
  1038.  end)
  1039. and state_65 lexbuf = (
  1040.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  1041.  setLexLastAction lexbuf (magic action_35);
  1042.  let val currChar = getNextChar lexbuf in
  1043.  case currChar of
  1044.     #"!" => state_65 lexbuf
  1045.  |  #"&" => state_65 lexbuf
  1046.  |  #"%" => state_65 lexbuf
  1047.  |  #"$" => state_65 lexbuf
  1048.  |  #"#" => state_65 lexbuf
  1049.  |  #"+" => state_65 lexbuf
  1050.  |  #"*" => state_65 lexbuf
  1051.  |  #"-" => state_65 lexbuf
  1052.  |  #"/" => state_65 lexbuf
  1053.  |  #":" => state_65 lexbuf
  1054.  |  #"@" => state_65 lexbuf
  1055.  |  #"?" => state_65 lexbuf
  1056.  |  #">" => state_65 lexbuf
  1057.  |  #"=" => state_65 lexbuf
  1058.  |  #"<" => state_65 lexbuf
  1059.  |  #"\\" => state_65 lexbuf
  1060.  |  #"^" => state_65 lexbuf
  1061.  |  #"|" => state_65 lexbuf
  1062.  |  #"~" => state_65 lexbuf
  1063.  |  _ => backtrack lexbuf
  1064.  end)
  1065. and state_66 lexbuf = (
  1066.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  1067.  setLexLastAction lexbuf (magic action_35);
  1068.  let val currChar = getNextChar lexbuf in
  1069.  if currChar >= #"0" andalso currChar <= #"9" then  state_66 lexbuf
  1070.  else if currChar >= #"A" andalso currChar <= #"Z" then  state_66 lexbuf
  1071.  else if currChar >= #"a" andalso currChar <= #"z" then  state_66 lexbuf
  1072.  else case currChar of
  1073.     #"'" => state_66 lexbuf
  1074.  |  #"_" => state_66 lexbuf
  1075.  |  _ => backtrack lexbuf
  1076.  end)
  1077. and state_67 lexbuf = (
  1078.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  1079.  setLexLastAction lexbuf (magic action_34);
  1080.  let val currChar = getNextChar lexbuf in
  1081.  case currChar of
  1082.     #"!" => state_67 lexbuf
  1083.  |  #"&" => state_67 lexbuf
  1084.  |  #"%" => state_67 lexbuf
  1085.  |  #"$" => state_67 lexbuf
  1086.  |  #"#" => state_67 lexbuf
  1087.  |  #"+" => state_67 lexbuf
  1088.  |  #"*" => state_67 lexbuf
  1089.  |  #"-" => state_67 lexbuf
  1090.  |  #"/" => state_67 lexbuf
  1091.  |  #":" => state_67 lexbuf
  1092.  |  #"@" => state_67 lexbuf
  1093.  |  #"?" => state_67 lexbuf
  1094.  |  #">" => state_67 lexbuf
  1095.  |  #"=" => state_67 lexbuf
  1096.  |  #"<" => state_67 lexbuf
  1097.  |  #"\\" => state_67 lexbuf
  1098.  |  #"^" => state_67 lexbuf
  1099.  |  #"|" => state_67 lexbuf
  1100.  |  #"~" => state_67 lexbuf
  1101.  |  #"." => state_64 lexbuf
  1102.  |  _ => backtrack lexbuf
  1103.  end)
  1104. and state_71 lexbuf = (
  1105.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  1106.  setLexLastAction lexbuf (magic action_33);
  1107.  let val currChar = getNextChar lexbuf in
  1108.  case currChar of
  1109.     #"*" => action_30 lexbuf
  1110.  |  _ => backtrack lexbuf
  1111.  end)
  1112. and state_72 lexbuf = (
  1113.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  1114.  setLexLastAction lexbuf (magic action_33);
  1115.  let val currChar = getNextChar lexbuf in
  1116.  case currChar of
  1117.     #")" => action_31 lexbuf
  1118.  |  _ => backtrack lexbuf
  1119.  end)
  1120. and state_81 lexbuf = (
  1121.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  1122.  setLexLastAction lexbuf (magic action_25);
  1123.  let val currChar = getNextChar lexbuf in
  1124.  if currChar >= #"0" andalso currChar <= #"9" then  state_84 lexbuf
  1125.  else case currChar of
  1126.     #"\"" => action_21 lexbuf
  1127.  |  #"\\" => action_21 lexbuf
  1128.  |  #"b" => action_21 lexbuf
  1129.  |  #"a" => action_21 lexbuf
  1130.  |  #"f" => action_21 lexbuf
  1131.  |  #"n" => action_21 lexbuf
  1132.  |  #"r" => action_21 lexbuf
  1133.  |  #"t" => action_21 lexbuf
  1134.  |  #"v" => action_21 lexbuf
  1135.  |  #"\r" => state_82 lexbuf
  1136.  |  #"\t" => state_82 lexbuf
  1137.  |  #"\n" => state_82 lexbuf
  1138.  |  #" " => state_82 lexbuf
  1139.  |  #"^" => state_85 lexbuf
  1140.  |  _ => backtrack lexbuf
  1141.  end)
  1142. and state_82 lexbuf = (
  1143.  let val currChar = getNextChar lexbuf in
  1144.  case currChar of
  1145.     #"\r" => state_82 lexbuf
  1146.  |  #"\t" => state_82 lexbuf
  1147.  |  #"\n" => state_82 lexbuf
  1148.  |  #" " => state_82 lexbuf
  1149.  |  #"\\" => action_22 lexbuf
  1150.  |  _ => backtrack lexbuf
  1151.  end)
  1152. and state_84 lexbuf = (
  1153.  let val currChar = getNextChar lexbuf in
  1154.  if currChar >= #"0" andalso currChar <= #"9" then  state_87 lexbuf
  1155.  else backtrack lexbuf
  1156.  end)
  1157. and state_85 lexbuf = (
  1158.  let val currChar = getNextChar lexbuf in
  1159.  if currChar >= #"@" andalso currChar <= #"_" then  action_23 lexbuf
  1160.  else backtrack lexbuf
  1161.  end)
  1162. and state_87 lexbuf = (
  1163.  let val currChar = getNextChar lexbuf in
  1164.  if currChar >= #"0" andalso currChar <= #"9" then  action_24 lexbuf
  1165.  else backtrack lexbuf
  1166.  end)
  1167. and state_94 lexbuf = (
  1168.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  1169.  setLexLastAction lexbuf (magic action_19);
  1170.  let val currChar = getNextChar lexbuf in
  1171.  case currChar of
  1172.     #"\"" => action_16 lexbuf
  1173.  |  #"\\" => action_16 lexbuf
  1174.  |  #"n" => action_16 lexbuf
  1175.  |  #"t" => action_16 lexbuf
  1176.  |  #"\r" => state_95 lexbuf
  1177.  |  #"\t" => state_95 lexbuf
  1178.  |  #"\n" => state_95 lexbuf
  1179.  |  #" " => state_95 lexbuf
  1180.  |  _ => backtrack lexbuf
  1181.  end)
  1182. and state_95 lexbuf = (
  1183.  let val currChar = getNextChar lexbuf in
  1184.  case currChar of
  1185.     #"\r" => state_95 lexbuf
  1186.  |  #"\t" => state_95 lexbuf
  1187.  |  #"\n" => state_95 lexbuf
  1188.  |  #" " => state_95 lexbuf
  1189.  |  #"\\" => action_17 lexbuf
  1190.  |  _ => backtrack lexbuf
  1191.  end)
  1192. and state_113 lexbuf = (
  1193.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  1194.  setLexLastAction lexbuf (magic action_0);
  1195.  let val currChar = getNextChar lexbuf in
  1196.  case currChar of
  1197.     #"!" => state_118 lexbuf
  1198.  |  #"&" => state_118 lexbuf
  1199.  |  #"%" => state_118 lexbuf
  1200.  |  #"$" => state_118 lexbuf
  1201.  |  #"#" => state_118 lexbuf
  1202.  |  #"+" => state_118 lexbuf
  1203.  |  #"*" => state_118 lexbuf
  1204.  |  #"-" => state_118 lexbuf
  1205.  |  #"/" => state_118 lexbuf
  1206.  |  #":" => state_118 lexbuf
  1207.  |  #"@" => state_118 lexbuf
  1208.  |  #"?" => state_118 lexbuf
  1209.  |  #">" => state_118 lexbuf
  1210.  |  #"=" => state_118 lexbuf
  1211.  |  #"<" => state_118 lexbuf
  1212.  |  #"\\" => state_118 lexbuf
  1213.  |  #"|" => state_118 lexbuf
  1214.  |  #"~" => state_118 lexbuf
  1215.  |  _ => backtrack lexbuf
  1216.  end)
  1217. and state_115 lexbuf = (
  1218.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  1219.  setLexLastAction lexbuf (magic action_0);
  1220.  let val currChar = getNextChar lexbuf in
  1221.  if currChar >= #"0" andalso currChar <= #"9" then  state_117 lexbuf
  1222.  else if currChar >= #"A" andalso currChar <= #"Z" then  state_117 lexbuf
  1223.  else if currChar >= #"a" andalso currChar <= #"z" then  state_117 lexbuf
  1224.  else case currChar of
  1225.     #"'" => state_117 lexbuf
  1226.  |  #"_" => state_117 lexbuf
  1227.  |  _ => backtrack lexbuf
  1228.  end)
  1229. and state_117 lexbuf = (
  1230.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  1231.  setLexLastAction lexbuf (magic action_0);
  1232.  let val currChar = getNextChar lexbuf in
  1233.  if currChar >= #"0" andalso currChar <= #"9" then  state_117 lexbuf
  1234.  else if currChar >= #"A" andalso currChar <= #"Z" then  state_117 lexbuf
  1235.  else if currChar >= #"a" andalso currChar <= #"z" then  state_117 lexbuf
  1236.  else case currChar of
  1237.     #"'" => state_117 lexbuf
  1238.  |  #"_" => state_117 lexbuf
  1239.  |  _ => backtrack lexbuf
  1240.  end)
  1241. and state_118 lexbuf = (
  1242.  setLexLastPos lexbuf (getLexCurrPos lexbuf);
  1243.  setLexLastAction lexbuf (magic action_0);
  1244.  let val currChar = getNextChar lexbuf in
  1245.  case currChar of
  1246.     #"!" => state_118 lexbuf
  1247.  |  #"&" => state_118 lexbuf
  1248.  |  #"%" => state_118 lexbuf
  1249.  |  #"$" => state_118 lexbuf
  1250.  |  #"#" => state_118 lexbuf
  1251.  |  #"+" => state_118 lexbuf
  1252.  |  #"*" => state_118 lexbuf
  1253.  |  #"-" => state_118 lexbuf
  1254.  |  #"/" => state_118 lexbuf
  1255.  |  #":" => state_118 lexbuf
  1256.  |  #"@" => state_118 lexbuf
  1257.  |  #"?" => state_118 lexbuf
  1258.  |  #">" => state_118 lexbuf
  1259.  |  #"=" => state_118 lexbuf
  1260.  |  #"<" => state_118 lexbuf
  1261.  |  #"\\" => state_118 lexbuf
  1262.  |  #"|" => state_118 lexbuf
  1263.  |  #"~" => state_118 lexbuf
  1264.  |  _ => backtrack lexbuf
  1265.  end)
  1266. and Token lexbuf =
  1267.   (setLexStartPos lexbuf (getLexCurrPos lexbuf);
  1268.    state_9 lexbuf)
  1269.  
  1270. and TokenN lexbuf =
  1271.   (setLexStartPos lexbuf (getLexCurrPos lexbuf);
  1272.    state_8 lexbuf)
  1273.  
  1274. and TokenId lexbuf =
  1275.   (setLexStartPos lexbuf (getLexCurrPos lexbuf);
  1276.    state_7 lexbuf)
  1277.  
  1278. and TokenIdQ lexbuf =
  1279.   (setLexStartPos lexbuf (getLexCurrPos lexbuf);
  1280.    state_6 lexbuf)
  1281.  
  1282. and Comment lexbuf =
  1283.   (setLexStartPos lexbuf (getLexCurrPos lexbuf);
  1284.    state_5 lexbuf)
  1285.  
  1286. and String lexbuf =
  1287.   (setLexStartPos lexbuf (getLexCurrPos lexbuf);
  1288.    state_4 lexbuf)
  1289.  
  1290. and SkipString lexbuf =
  1291.   (setLexStartPos lexbuf (getLexCurrPos lexbuf);
  1292.    state_3 lexbuf)
  1293.  
  1294. and Quotation lexbuf =
  1295.   (setLexStartPos lexbuf (getLexCurrPos lexbuf);
  1296.    state_2 lexbuf)
  1297.  
  1298. and SkipQuotation lexbuf =
  1299.   (setLexStartPos lexbuf (getLexCurrPos lexbuf);
  1300.    state_1 lexbuf)
  1301.  
  1302. and AntiQuotation lexbuf =
  1303.   (setLexStartPos lexbuf (getLexCurrPos lexbuf);
  1304.    state_0 lexbuf)
  1305.  
  1306. (* The following checks type consistency of actions *)
  1307. val _ = fn _ => [action_70, action_69];
  1308. val _ = fn _ => [action_68, action_67, action_66, action_65, action_64, action_63, action_62, action_61, action_60, action_59, action_58, action_57, action_56, action_55, action_54, action_53, action_52, action_51, action_50, action_49, action_48, action_47, action_46, action_45, action_44, action_43, action_42, action_41];
  1309. val _ = fn _ => [action_40, action_39, action_38];
  1310. val _ = fn _ => [action_37, action_36, action_35, action_34];
  1311. val _ = fn _ => [action_33, action_32, action_31, action_30];
  1312. val _ = fn _ => [action_29, action_28, action_27, action_26, action_25, action_24, action_23, action_22, action_21, action_20];
  1313. val _ = fn _ => [action_19, action_18, action_17, action_16, action_15];
  1314. val _ = fn _ => [action_14, action_13, action_12, action_11, action_10, action_9, action_8];
  1315. val _ = fn _ => [action_7, action_6, action_5];
  1316. val _ = fn _ => [action_4, action_3, action_2, action_1, action_0];
  1317.  
  1318. end
  1319.