//
//  This CSharp output file generated by Gardens Point LEX
//  Version:  1.1.1.297
//  Machine:  CHAMBRE
//  DateTime: 07/01/2010 00:30:00
//  UserName: robert
//  GPLEX input file <GLLexer.lex>
//  GPLEX frame file <embedded resource>
//
//  Option settings: unicode, verbose, noParser, minimize
//  Option settings: classes, compressMap, compressNext, persistBuffer, embedbuffers
//  Fallback code page: Target machine default
//

//
// Experimental embedded frame
// Version 1.1.0 of 11-February-2009
//
//
#define BACKUP
#define STANDALONE
#define PERSIST

using System;
using System.IO;
using System.Text;
using System.Globalization;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Diagnostics.CodeAnalysis;


namespace GLScript
{   
    /// <summary>
    /// Summary Canonical example of GPLEX automaton
    /// </summary>
    
#if STANDALONE
    //
    // These are the dummy declarations for stand-alone GPLEX applications
    // normally these declarations would come from the parser.
    // If you declare /noparser, or %option noparser then you get this.
    //

     public enum Tokens
    { 
      EOF = 0, maxParseToken = int.MaxValue 
      // must have at least these two, values are almost arbitrary
    }

     public abstract class ScanBase
    {
        [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "yylex")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "yylex")]
        public abstract int yylex();

        [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "yywrap")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "yywrap")]
        protected virtual bool yywrap() { return true; }

#if BABEL
        protected abstract int CurrentSc { get; set; }
        // EolState is the 32-bit of state data persisted at 
        // the end of each line for Visual Studio colorization.  
        // The default is to return CurrentSc.  You must override
        // this if you want more complicated behavior.
        public virtual int EolState { 
            get { return CurrentSc; }
            set { CurrentSc = value; } 
        }
    }
    
     public interface IColorScan
    {
        void SetSource(string source, int offset);
        int GetNext(ref int state, out int start, out int end);
#endif // BABEL
    }

#endif // STANDALONE
    
    // If the compiler can't find the scanner base class maybe you
    // need to run GPPG with the /gplex option, or GPLEX with /noparser
#if BABEL
     public sealed partial class Scanner : ScanBase, IColorScan
    {
        private ScanBuff buffer;
        int currentScOrd;  // start condition ordinal
        
        protected override int CurrentSc 
        {
             // The current start state is a property
             // to try to avoid the user error of setting
             // scState but forgetting to update the FSA
             // start state "currentStart"
             //
             get { return currentScOrd; }  // i.e. return YY_START;
             set { currentScOrd = value;   // i.e. BEGIN(value);
                   currentStart = startState[value]; }
        }
#else  // BABEL
     public sealed partial class Scanner : ScanBase
    {
        private ScanBuff buffer;
        int currentScOrd;  // start condition ordinal
#endif // BABEL
        
        /// <summary>
        /// The input buffer for this scanner.
        /// </summary>
        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        public ScanBuff Buffer { get { return buffer; } }
        
        private static int GetMaxParseToken() {
     System.Reflection.FieldInfo f = typeof(Tokens).GetField("maxParseToken");
            return (f == null ? int.MaxValue : (int)f.GetValue(null));
        }
        
        static int parserMax = GetMaxParseToken();
        
        enum Result {accept, noMatch, contextFound};

        const int maxAccept = 194;
        const int initial = 195;
        const int eofNum = 0;
        const int goStart = -1;
        const int INITIAL = 0;
        const int COMMENT = 1;
        const int COMMENTSHARP = 2;
        const int STVARRAY = 3;
        const int STFUNCTION = 4;
        const int STUNARY = 5;

#region user code
/*
This is a simple parser for html.  It tries to turn the html into something that
can be displayed by a wiki.
 */
#endregion user code

        int state;
        int currentStart = startState[0];
        int code;      // last code read
        int cCol;      // column number of code
        int lNum;      // current line number
        //
        // The following instance variables are used, among other
        // things, for constructing the yylloc location objects.
        //
        int tokPos;        // buffer position at start of token
        int tokCol;        // zero-based column number at start of token
        int tokLin;        // line number at start of token
        int tokEPos;       // buffer position at end of token
        int tokECol;       // column number at end of token
        int tokELin;       // line number at end of token
        string tokTxt;     // lazily constructed text of token
#if STACK          
        private Stack<int> scStack = new Stack<int>();
#endif // STACK

#region ScannerTables
    struct Table {
        public int min; public int rng; public int dflt;
        public short[] nxt;
        public Table(int m, int x, int d, short[] n) {
            min = m; rng = x; dflt = d; nxt = n;
        }
    };

    static int[] startState = new int[] {195, 161, 169, 172, 181, 211, 
        0};

#region CompressedCharacterMap
    //
    // There are 50 equivalence classes
    // There are 2 character sequence regions
    // There are 1 tables, 195 entries
    // There are 1 runs, 0 singletons
    // Decision tree depth is 1
    //
    static sbyte[] mapC0 = new sbyte[195] {
/*     '\0' */ 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 37, 0, 0, 48, 0, 0, 
/*   '\x10' */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
/*   '\x20' */ 48, 1, 46, 49, 42, 0, 17, 0, 5, 6, 12, 10, 2, 11, 9, 13, 
/*      '0' */ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 3, 4, 15, 14, 16, 0, 
/*      '@' */ 0, 30, 28, 29, 32, 22, 36, 41, 31, 39, 43, 35, 40, 43, 24, 33, 
/*      'P' */ 43, 43, 34, 26, 25, 27, 23, 38, 43, 43, 43, 7, 47, 8, 19, 45, 
/*      '`' */ 0, 30, 28, 29, 32, 22, 36, 41, 31, 39, 43, 35, 40, 43, 24, 33, 
/*      'p' */ 43, 43, 34, 26, 25, 27, 23, 38, 43, 43, 43, 0, 18, 0, 0, 0, 
/*   '\x80' */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
/*   '\x90' */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
/*   '\xA0' */ 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 
/*   '\xB0' */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
/*   '\xC0' */ 0, 0, 20 };

    static sbyte MapC(int code)
    { // '\0' <= code <= '\U0010FFFF'
      if (code < 195) // '\0' <= code <= '\xC2'
        return mapC0[code - 0];
      else // '\xC3' <= code <= '\U0010FFFF'
        return (sbyte)0;
    }
#endregion

    static Table[] NxS = new Table[212] {
/* NxS[   0] */ new Table(0, 0, 0, null), // Shortest string ""
/* NxS[   1] */ new Table(0, 0, -1, null), // Shortest string "\xA7"
/* NxS[   2] */ // Shortest string "!"
      new Table(14, 1, -1, new short[] {160}),
/* NxS[   3] */ new Table(0, 0, -1, null), // Shortest string ","
/* NxS[   4] */ new Table(0, 0, -1, null), // Shortest string ":"
/* NxS[   5] */ new Table(0, 0, -1, null), // Shortest string ";"
/* NxS[   6] */ new Table(0, 0, -1, null), // Shortest string "("
/* NxS[   7] */ new Table(0, 0, -1, null), // Shortest string ")"
/* NxS[   8] */ new Table(0, 0, -1, null), // Shortest string "["
/* NxS[   9] */ new Table(0, 0, -1, null), // Shortest string "]"
/* NxS[  10] */ new Table(0, 0, -1, null), // Shortest string "."
/* NxS[  11] */ new Table(0, 0, -1, null), // Shortest string "+"
/* NxS[  12] */ new Table(0, 0, -1, null), // Shortest string "-"
/* NxS[  13] */ new Table(0, 0, -1, null), // Shortest string "*"
/* NxS[  14] */ // Shortest string "/"
      new Table(12, 1, -1, new short[] {159}),
/* NxS[  15] */ // Shortest string "="
      new Table(14, 1, -1, new short[] {158}),
/* NxS[  16] */ // Shortest string "<"
      new Table(14, 3, -1, new short[] {156, -1, 157}),
/* NxS[  17] */ // Shortest string ">"
      new Table(14, 1, -1, new short[] {155}),
/* NxS[  18] */ // Shortest string "&"
      new Table(17, 1, -1, new short[] {154}),
/* NxS[  19] */ // Shortest string "|"
      new Table(18, 1, -1, new short[] {153}),
/* NxS[  20] */ new Table(0, 0, -1, null), // Shortest string "^"
/* NxS[  21] */ // Shortest string "\xC2"
      new Table(21, 1, -1, new short[] {152}),
/* NxS[  22] */ // Shortest string "E"
      new Table(22, 34, -1, new short[] {23, 95, 111, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 112, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  23] */ // Shortest string "V"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  24] */ // Shortest string "T"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 108, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  25] */ // Shortest string "S"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 93, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 102, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  26] */ // Shortest string "B"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 98, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  27] */ // Shortest string "C"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 81, 23, 23, 82, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  28] */ // Shortest string "D"
      new Table(22, 34, -1, new short[] {75, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  29] */ // Shortest string "F"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 67, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  30] */ // Shortest string "\n"
      new Table(37, 12, -1, new short[] {30, -1, -1, -1, -1, -1, 
          -1, -1, -1, -1, -1, 30}),
/* NxS[  31] */ // Shortest string "W"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 62, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  32] */ // Shortest string "I"
      new Table(22, 34, -1, new short[] {23, 23, 59, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 60, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  33] */ // Shortest string "L"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 56, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  34] */ // Shortest string "G"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 48, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  35] */ // Shortest string "$"
      new Table(22, 22, -1, new short[] {45, 45, 45, 45, 45, 45, 
          45, 45, 45, 45, 45, 45, 45, 45, 45, -1, 45, 45, 45, 45, -1, 45}),
/* NxS[  36] */ // Shortest string "0"
      new Table(44, 16, -1, new short[] {36, -1, -1, -1, -1, -1, 
          -1, -1, -1, -1, -1, -1, -1, -1, -1, 197}),
/* NxS[  37] */ // Shortest string "\""
      new Table(37, 11, 37, new short[] {-1, 37, 37, 37, 37, 37, 
          37, 37, 37, 39, 40}),
/* NxS[  38] */ new Table(0, 0, -1, null), // Shortest string "#"
/* NxS[  39] */ new Table(0, 0, -1, null), // Shortest string "\"\""
/* NxS[  40] */ // Shortest string "\"\\"
      new Table(37, 12, 37, new short[] {196, 37, 37, 37, 37, 37, 
          37, 37, 37, 41, 40, 42}),
/* NxS[  41] */ // Shortest string "\"\\\""
      new Table(37, 11, 37, new short[] {-1, 37, 37, 37, 37, 37, 
          37, 37, 37, 39, 40}),
/* NxS[  42] */ // Shortest string "\"\\\x08"
      new Table(37, 12, 37, new short[] {196, 37, 37, 37, 37, 37, 
          37, 37, 37, 39, 40, 42}),
/* NxS[  43] */ // Shortest string "0.0"
      new Table(44, 16, -1, new short[] {43, -1, -1, -1, -1, -1, 
          -1, -1, -1, -1, -1, -1, -1, -1, -1, 198}),
/* NxS[  44] */ // Shortest string "0.0.0.0"
      new Table(44, 1, -1, new short[] {44}),
/* NxS[  45] */ // Shortest string "$E"
      new Table(37, 35, 45, new short[] {201, 45, 45, 45, 45, -1, 
          45, 45, 45, -1, -1, 201, -1, -1, -1, -1, -1, -1, -1, -1, 46, -1, 
          -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}),
/* NxS[  46] */ new Table(0, 0, -1, null), // Shortest string "$E["
/* NxS[  47] */ new Table(0, 0, -1, null), // Shortest string "E("
/* NxS[  48] */ // Shortest string "GL"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 49, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  49] */ // Shortest string "GLO"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          50, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  50] */ // Shortest string "GLOB"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 51, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  51] */ // Shortest string "GLOBA"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 52, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  52] */ // Shortest string "GLOBAL"
      new Table(22, 34, -1, new short[] {23, 53, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  53] */ // Shortest string "GLOBALV"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 54, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  54] */ // Shortest string "GLOBALVA"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 55, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  55] */ // Shortest string "GLOBALVAR"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  56] */ // Shortest string "LA"
      new Table(22, 34, -1, new short[] {23, 23, 57, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  57] */ // Shortest string "LAN"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 58, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  58] */ // Shortest string "LANG"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  59] */ // Shortest string "IN"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  60] */ // Shortest string "IF"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 203, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 203, -1, -1, -1, -1, -1, -1, 61}),
/* NxS[  61] */ new Table(0, 0, -1, null), // Shortest string "IF("
/* NxS[  62] */ // Shortest string "WH"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 63, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  63] */ // Shortest string "WHI"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 64, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  64] */ // Shortest string "WHIL"
      new Table(22, 34, -1, new short[] {65, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  65] */ // Shortest string "WHILE"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 204, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 204, -1, -1, -1, -1, -1, -1, 66}),
/* NxS[  66] */ new Table(0, 0, -1, null), // Shortest string "WHILE("
/* NxS[  67] */ // Shortest string "FO"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 68, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  68] */ // Shortest string "FOR"
      new Table(22, 34, -1, new short[] {70, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 205, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 205, -1, -1, -1, -1, -1, -1, 69}),
/* NxS[  69] */ new Table(0, 0, -1, null), // Shortest string "FOR("
/* NxS[  70] */ // Shortest string "FORE"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 71, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  71] */ // Shortest string "FOREA"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 72, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  72] */ // Shortest string "FOREAC"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 73, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  73] */ // Shortest string "FOREACH"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 206, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 206, -1, -1, -1, -1, -1, -1, 74}),
/* NxS[  74] */ new Table(0, 0, -1, null), // Shortest string "FOREACH("
/* NxS[  75] */ // Shortest string "DE"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 76, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  76] */ // Shortest string "DEF"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 77, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  77] */ // Shortest string "DEFA"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 78, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  78] */ // Shortest string "DEFAU"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 79, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  79] */ // Shortest string "DEFAUL"
      new Table(22, 34, -1, new short[] {23, 23, 23, 80, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  80] */ // Shortest string "DEFAULT"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  81] */ // Shortest string "CA"
      new Table(22, 34, -1, new short[] {23, 23, 23, 86, 87, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  82] */ // Shortest string "CO"
      new Table(22, 34, -1, new short[] {23, 23, 83, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  83] */ // Shortest string "CON"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 84, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  84] */ // Shortest string "CONS"
      new Table(22, 34, -1, new short[] {23, 23, 23, 85, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  85] */ // Shortest string "CONST"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  86] */ // Shortest string "CAT"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 89, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  87] */ // Shortest string "CAS"
      new Table(22, 34, -1, new short[] {88, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  88] */ // Shortest string "CASE"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  89] */ // Shortest string "CATC"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 90, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  90] */ // Shortest string "CATCH"
      new Table(22, 34, -1, new short[] {91, 23, 23, 23, 92, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  91] */ // Shortest string "CATCHE"
      new Table(22, 34, -1, new short[] {23, 95, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  92] */ // Shortest string "CATCHS"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 93, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  93] */ // Shortest string "SU"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          94, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  94] */ // Shortest string "SUB"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  95] */ // Shortest string "EV"
      new Table(22, 34, -1, new short[] {96, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  96] */ // Shortest string "EVE"
      new Table(22, 34, -1, new short[] {23, 23, 97, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  97] */ // Shortest string "EVEN"
      new Table(22, 34, -1, new short[] {23, 23, 23, 94, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  98] */ // Shortest string "BR"
      new Table(22, 34, -1, new short[] {99, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[  99] */ // Shortest string "BRE"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 100, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 100] */ // Shortest string "BREA"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 101, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 101] */ // Shortest string "BREAK"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 102] */ // Shortest string "SW"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 103, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 103] */ // Shortest string "SWI"
      new Table(22, 34, -1, new short[] {23, 23, 23, 104, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 104] */ // Shortest string "SWIT"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 105, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 105] */ // Shortest string "SWITC"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 106, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 106] */ // Shortest string "SWITCH"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 207, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 207, -1, -1, -1, -1, -1, -1, 107}),
/* NxS[ 107] */ new Table(0, 0, -1, null), // Shortest string "SWITCH("
/* NxS[ 108] */ // Shortest string "TH"
      new Table(22, 34, -1, new short[] {109, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 109] */ // Shortest string "THE"
      new Table(22, 34, -1, new short[] {23, 23, 110, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 110] */ // Shortest string "THEN"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 111] */ // Shortest string "EN"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 115, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 112] */ // Shortest string "EL"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 113, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 113] */ // Shortest string "ELS"
      new Table(22, 34, -1, new short[] {114, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 114] */ // Shortest string "ELSE"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 115] */ // Shortest string "END"
      new Table(22, 34, -1, new short[] {140, 23, 23, 23, 116, 23, 
          23, 117, 23, 23, 23, 23, 23, 23, 118, 202, 119, 120, 121, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 116] */ // Shortest string "ENDS"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 142, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 147, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 117] */ // Shortest string "ENDC"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 136, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 118] */ // Shortest string "ENDF"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 130, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 119] */ // Shortest string "ENDW"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 126, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 120] */ // Shortest string "ENDI"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 125, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 121] */ // Shortest string "ENDL"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 122, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 122] */ // Shortest string "ENDLA"
      new Table(22, 34, -1, new short[] {23, 23, 123, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 123] */ // Shortest string "ENDLAN"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 124, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 124] */ // Shortest string "ENDLANG"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 125] */ // Shortest string "ENDIF"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 126] */ // Shortest string "ENDWH"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 127, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 127] */ // Shortest string "ENDWHI"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 128, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 128] */ // Shortest string "ENDWHIL"
      new Table(22, 34, -1, new short[] {129, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 129] */ // Shortest string "ENDWHILE"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 130] */ // Shortest string "ENDFO"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 131, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 131] */ // Shortest string "ENDFOR"
      new Table(22, 34, -1, new short[] {132, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 132] */ // Shortest string "ENDFORE"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 133, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 133] */ // Shortest string "ENDFOREA"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 134, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 134] */ // Shortest string "ENDFOREAC"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 135, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 135] */ // Shortest string "ENDFOREACH"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 136] */ // Shortest string "ENDCA"
      new Table(22, 34, -1, new short[] {23, 23, 23, 137, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 137] */ // Shortest string "ENDCAT"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 138, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 138] */ // Shortest string "ENDCATC"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 139, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 139] */ // Shortest string "ENDCATCH"
      new Table(22, 34, -1, new short[] {140, 23, 23, 23, 141, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 140] */ // Shortest string "ENDE"
      new Table(22, 34, -1, new short[] {23, 144, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 141] */ // Shortest string "ENDCATCHS"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 142, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 142] */ // Shortest string "ENDSU"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          143, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 143] */ // Shortest string "ENDSUB"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 144] */ // Shortest string "ENDEV"
      new Table(22, 34, -1, new short[] {145, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 145] */ // Shortest string "ENDEVE"
      new Table(22, 34, -1, new short[] {23, 23, 146, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 146] */ // Shortest string "ENDEVEN"
      new Table(22, 34, -1, new short[] {23, 23, 23, 143, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 147] */ // Shortest string "ENDSW"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 148, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 148] */ // Shortest string "ENDSWI"
      new Table(22, 34, -1, new short[] {23, 23, 23, 149, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 149] */ // Shortest string "ENDSWIT"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 150, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 150] */ // Shortest string "ENDSWITC"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 151, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 151] */ // Shortest string "ENDSWITCH"
      new Table(22, 34, -1, new short[] {23, 23, 23, 23, 23, 23, 
          23, 23, 23, 23, 23, 23, 23, 23, 23, 202, 23, 23, 23, 23, -1, 23, 
          23, 23, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 152] */ new Table(0, 0, -1, null), // Shortest string "\xC2\xA7"
/* NxS[ 153] */ new Table(0, 0, -1, null), // Shortest string "||"
/* NxS[ 154] */ new Table(0, 0, -1, null), // Shortest string "&&"
/* NxS[ 155] */ new Table(0, 0, -1, null), // Shortest string ">="
/* NxS[ 156] */ new Table(0, 0, -1, null), // Shortest string "<="
/* NxS[ 157] */ new Table(0, 0, -1, null), // Shortest string "<>"
/* NxS[ 158] */ new Table(0, 0, -1, null), // Shortest string "=="
/* NxS[ 159] */ new Table(0, 0, -1, null), // Shortest string "/*"
/* NxS[ 160] */ new Table(0, 0, -1, null), // Shortest string "!="
/* NxS[ 161] */ // Shortest string ""
      new Table(12, 26, 164, new short[] {162, 163, 164, 164, 164, 164, 
          164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 
          164, 164, 164, -1}),
/* NxS[ 162] */ // Shortest string "*"
      new Table(12, 26, 164, new short[] {167, 168, 164, 164, 164, 164, 
          164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 
          164, 164, 164, -1}),
/* NxS[ 163] */ // Shortest string "/"
      new Table(12, 26, 164, new short[] {165, 166, 164, 164, 164, 164, 
          164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 
          164, 164, 164, -1}),
/* NxS[ 164] */ // Shortest string "!"
      new Table(12, 26, 164, new short[] {208, 209, 164, 164, 164, 164, 
          164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 
          164, 164, 164, -1}),
/* NxS[ 165] */ new Table(0, 0, -1, null), // Shortest string "/*"
/* NxS[ 166] */ // Shortest string "//"
      new Table(12, 26, 164, new short[] {208, 166, 164, 164, 164, 164, 
          164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 
          164, 164, 164, -1}),
/* NxS[ 167] */ // Shortest string "**"
      new Table(12, 26, 164, new short[] {167, 209, 164, 164, 164, 164, 
          164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 
          164, 164, 164, -1}),
/* NxS[ 168] */ new Table(0, 0, -1, null), // Shortest string "*/"
/* NxS[ 169] */ // Shortest string ""
      new Table(37, 1, 170, new short[] {171}),
/* NxS[ 170] */ // Shortest string "!"
      new Table(37, 1, 170, new short[] {-1}),
/* NxS[ 171] */ new Table(0, 0, -1, null), // Shortest string "\n"
/* NxS[ 172] */ // Shortest string ""
      new Table(37, 22, 173, new short[] {180, 173, 173, 173, 173, 173, 
          173, 173, 173, 173, 173, 180, 173, 173, 173, 174, 173, 175, 176, 177, 178, 179}),
/* NxS[ 173] */ // Shortest string "!"
      new Table(2, 7, 173, new short[] {-1, 173, -1, -1, -1, -1, 
          -1}),
/* NxS[ 174] */ new Table(0, 0, -1, null), // Shortest string ","
/* NxS[ 175] */ new Table(0, 0, -1, null), // Shortest string ";"
/* NxS[ 176] */ new Table(0, 0, -1, null), // Shortest string "("
/* NxS[ 177] */ new Table(0, 0, -1, null), // Shortest string ")"
/* NxS[ 178] */ new Table(0, 0, -1, null), // Shortest string "["
/* NxS[ 179] */ new Table(0, 0, -1, null), // Shortest string "]"
/* NxS[ 180] */ // Shortest string "\n"
      new Table(37, 22, 173, new short[] {180, 173, 173, 173, 173, 173, 
          173, 173, 173, 173, 173, 180, 173, 173, 173, -1, 173, -1, -1, -1, -1, -1}),
/* NxS[ 181] */ // Shortest string ""
      new Table(37, 22, 182, new short[] {189, 182, 182, 182, 182, 182, 
          182, 182, 182, 190, 182, 189, 182, 182, 182, 183, 182, 184, 185, 186, 187, 188}),
/* NxS[ 182] */ // Shortest string "!"
      new Table(46, 13, 182, new short[] {-1, 182, 182, 182, 182, 182, 
          -1, 182, -1, -1, -1, -1, -1}),
/* NxS[ 183] */ new Table(0, 0, -1, null), // Shortest string ","
/* NxS[ 184] */ new Table(0, 0, -1, null), // Shortest string ";"
/* NxS[ 185] */ new Table(0, 0, -1, null), // Shortest string "("
/* NxS[ 186] */ new Table(0, 0, -1, null), // Shortest string ")"
/* NxS[ 187] */ new Table(0, 0, -1, null), // Shortest string "["
/* NxS[ 188] */ new Table(0, 0, -1, null), // Shortest string "]"
/* NxS[ 189] */ // Shortest string "\n"
      new Table(37, 22, 182, new short[] {189, 182, 182, 182, 182, 182, 
          182, 182, 182, -1, 182, 189, 182, 182, 182, -1, 182, -1, -1, -1, -1, -1}),
/* NxS[ 190] */ // Shortest string "\""
      new Table(37, 11, 190, new short[] {-1, 190, 190, 190, 190, 190, 
          190, 190, 190, 191, 192}),
/* NxS[ 191] */ new Table(0, 0, -1, null), // Shortest string "\"\""
/* NxS[ 192] */ // Shortest string "\"\\"
      new Table(37, 12, 190, new short[] {210, 190, 190, 190, 190, 190, 
          190, 190, 190, 193, 192, 194}),
/* NxS[ 193] */ // Shortest string "\"\\\""
      new Table(37, 11, 190, new short[] {-1, 190, 190, 190, 190, 190, 
          190, 190, 190, 191, 192}),
/* NxS[ 194] */ // Shortest string "\"\\\x08"
      new Table(37, 12, 190, new short[] {210, 190, 190, 190, 190, 190, 
          190, 190, 190, 191, 192, 194}),
/* NxS[ 195] */ // Shortest string ""
      new Table(36, 47, 23, new short[] {29, 30, 31, 32, 33, 34, 
          35, 23, 36, 1, 37, 1, 30, 38, 1, 2, 3, 4, 5, 6, 7, 8, 
          9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 1, 22, 23, 
          23, 24, 25, 23, 26, 27, 23, 23, 28}),
/* NxS[ 196] */ // Shortest string "\"\\\n"
      new Table(37, 12, -1, new short[] {196, -1, -1, -1, -1, -1, 
          -1, -1, -1, -1, 37, 196}),
/* NxS[ 197] */ // Shortest string "0."
      new Table(44, 1, -1, new short[] {43}),
/* NxS[ 198] */ // Shortest string "0.0."
      new Table(44, 1, -1, new short[] {199}),
/* NxS[ 199] */ // Shortest string "0.0.0"
      new Table(44, 16, -1, new short[] {199, -1, -1, -1, -1, -1, 
          -1, -1, -1, -1, -1, -1, -1, -1, -1, 200}),
/* NxS[ 200] */ // Shortest string "0.0.0."
      new Table(44, 1, -1, new short[] {44}),
/* NxS[ 201] */ // Shortest string "$E\n"
      new Table(37, 21, -1, new short[] {201, -1, -1, -1, -1, -1, 
          -1, -1, -1, -1, -1, 201, -1, -1, -1, -1, -1, -1, -1, -1, 46}),
/* NxS[ 202] */ // Shortest string "E\n"
      new Table(37, 19, -1, new short[] {202, -1, -1, -1, -1, -1, 
          -1, -1, -1, -1, -1, 202, -1, -1, -1, -1, -1, -1, 47}),
/* NxS[ 203] */ // Shortest string "IF\n"
      new Table(37, 19, -1, new short[] {203, -1, -1, -1, -1, -1, 
          -1, -1, -1, -1, -1, 203, -1, -1, -1, -1, -1, -1, 61}),
/* NxS[ 204] */ // Shortest string "WHILE\n"
      new Table(37, 19, -1, new short[] {204, -1, -1, -1, -1, -1, 
          -1, -1, -1, -1, -1, 204, -1, -1, -1, -1, -1, -1, 66}),
/* NxS[ 205] */ // Shortest string "FOR\n"
      new Table(37, 19, -1, new short[] {205, -1, -1, -1, -1, -1, 
          -1, -1, -1, -1, -1, 205, -1, -1, -1, -1, -1, -1, 69}),
/* NxS[ 206] */ // Shortest string "FOREACH\n"
      new Table(37, 19, -1, new short[] {206, -1, -1, -1, -1, -1, 
          -1, -1, -1, -1, -1, 206, -1, -1, -1, -1, -1, -1, 74}),
/* NxS[ 207] */ // Shortest string "SWITCH\n"
      new Table(37, 19, -1, new short[] {207, -1, -1, -1, -1, -1, 
          -1, -1, -1, -1, -1, 207, -1, -1, -1, -1, -1, -1, 107}),
/* NxS[ 208] */ // Shortest string "!*"
      new Table(12, 26, 164, new short[] {167, -1, 164, 164, 164, 164, 
          164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 
          164, 164, 164, -1}),
/* NxS[ 209] */ // Shortest string "!/"
      new Table(12, 26, 164, new short[] {-1, 166, 164, 164, 164, 164, 
          164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 
          164, 164, 164, -1}),
/* NxS[ 210] */ // Shortest string "\"\\\n"
      new Table(37, 12, -1, new short[] {210, -1, -1, -1, -1, -1, 
          -1, -1, -1, -1, 190, 210}),
/* NxS[ 211] */ new Table(0, 0, -1, null), // Shortest string ""
    };

int NextState() {
    if (code == ScanBuff.EndOfFile)
        return eofNum;
    else
        unchecked {
            int rslt;
            int idx = MapC(code) - NxS[state].min;
            if (idx < 0) idx += 50;
            if ((uint)idx >= (uint)NxS[state].rng) rslt = NxS[state].dflt;
            else rslt = NxS[state].nxt[idx];
            return rslt;
        }
}

#endregion


#if BACKUP
        // ==============================================================
        // == Nested struct used for backup in automata that do backup ==
        // ==============================================================

        struct Context // class used for automaton backup.
        {
            public int bPos;
            public int rPos; // scanner.readPos saved value
            public int cCol;
            public int lNum; // Need this in case of backup over EOL.
            public int state;
            public int cChr;
        }
        
        private Context ctx = new Context();
#endif // BACKUP

        // ==============================================================
        // ==== Nested struct to support input switching in scanners ====
        // ==============================================================

		struct BufferContext {
            internal ScanBuff buffSv;
			internal int chrSv;
			internal int cColSv;
			internal int lNumSv;
		}

        // ==============================================================
        // ===== Private methods to save and restore buffer contexts ====
        // ==============================================================

        /// <summary>
        /// This method creates a buffer context record from
        /// the current buffer object, together with some
        /// scanner state values. 
        /// </summary>
        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        BufferContext MkBuffCtx()
		{
			BufferContext rslt;
			rslt.buffSv = this.buffer;
			rslt.chrSv = this.code;
			rslt.cColSv = this.cCol;
			rslt.lNumSv = this.lNum;
			return rslt;
		}

        /// <summary>
        /// This method restores the buffer value and allied
        /// scanner state from the given context record value.
        /// </summary>
        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        void RestoreBuffCtx(BufferContext value)
		{
			this.buffer = value.buffSv;
			this.code = value.chrSv;
			this.cCol = value.cColSv;
			this.lNum = value.lNumSv;
        } 
        // =================== End Nested classes =======================

#if !NOFILES
     public Scanner(Stream file) {
            SetSource(file, 0); // unicode option
        }

        public Scanner(Stream file, string codepage) {
            SetSource(file, CodePageHandling.GetCodePage(codepage));
        }
        
#endif // !NOFILES

     public Scanner() { }

        private int readPos;

        void GetCode()
        {
            if (code == '\n')  // This needs to be fixed for other conventions
                               // i.e. [\r\n\205\u2028\u2029]
            { 
                cCol = -1;
                lNum++;
            }
            readPos = buffer.Pos;

            // Now read new codepoint.
            code = buffer.Read();
            if (code > ScanBuff.EndOfFile)
            {
#if (!BYTEMODE)
                if (code >= 0xD800 && code <= 0xDBFF)
                {
                    int next = buffer.Read();
                    if (next < 0xDC00 || next > 0xDFFF)
                        code = ScanBuff.UnicodeReplacementChar;
                    else
                        code = (0x10000 + (code & 0x3FF << 10) + (next & 0x3FF));
                }
#endif
                cCol++;
            }
        }

        void MarkToken()
        {
#if (!PERSIST)
            buffer.Mark();
#endif
            tokPos = readPos;
            tokLin = lNum;
            tokCol = cCol;
        }
        
        void MarkEnd()
        {
            tokTxt = null;
            tokEPos = readPos;
            tokELin = lNum;
            tokECol = cCol;
        }

        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        int Peek()
        {
            int rslt, codeSv = code, cColSv = cCol, lNumSv = lNum, bPosSv = buffer.Pos;
            GetCode(); rslt = code;
            lNum = lNumSv; cCol = cColSv; code = codeSv; buffer.Pos = bPosSv;
            return rslt;
        }

        // ==============================================================
        // =====    Initialization of string-based input buffers     ====
        // ==============================================================

        /// <summary>
        /// Create and initialize a StringBuff buffer object for this scanner
        /// </summary>
        /// <param name="source">the input string</param>
        /// <param name="offset">starting offset in the string</param>
        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        public void SetSource(string source, int offset)
        {
            this.buffer = ScanBuff.GetBuffer(source);
            this.buffer.Pos = offset;
            this.lNum = 0;
            this.code = '\n'; // to initialize yyline, yycol and lineStart
            GetCode();
        }

#if !NOFILES        
        // ================ LineBuffer Initialization ===================

        /// <summary>
        /// Create and initialize a LineBuff buffer object for this scanner
        /// </summary>
        /// <param name="source">the list of input strings</param>
        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        public void SetSource(IList<string> source)
        {
            this.buffer = ScanBuff.GetBuffer(source);
            this.code = '\n'; // to initialize yyline, yycol and lineStart
            this.lNum = 0;
            GetCode();
        }

        // =============== StreamBuffer Initialization ==================

        /// <summary>
        /// Create and initialize a StreamBuff buffer object for this scanner.
        /// StreamBuff is buffer for 8-bit byte files.
        /// </summary>
        /// <param name="source">the input byte stream</param>
        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        public void SetSource(Stream source)
        {
            this.buffer = ScanBuff.GetBuffer(source);
            this.lNum = 0;
            this.code = '\n'; // to initialize yyline, yycol and lineStart
            GetCode();
        }
        
#if !BYTEMODE
        // ================ TextBuffer Initialization ===================

        /// <summary>
        /// Create and initialize a TextBuff buffer object for this scanner.
        /// TextBuff is a buffer for encoded unicode files.
        /// </summary>
        /// <param name="source">the input text file</param>
        /// <param name="fallbackCodePage">Code page to use if file has
        /// no BOM. For 0, use machine default; for -1, 8-bit binary</param>
        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        public void SetSource(Stream source, int fallbackCodePage)
        {
            this.buffer = ScanBuff.GetBuffer(source, fallbackCodePage);
            this.lNum = 0;
            this.code = '\n'; // to initialize yyline, yycol and lineStart
            GetCode();
        }
#endif // !BYTEMODE
#endif // !NOFILES
        
        // ==============================================================

#if BABEL
        //
        //  Get the next token for Visual Studio
        //
        //  "state" is the inout mode variable that maintains scanner
        //  state between calls, using the EolState property. In principle,
        //  if the calls of EolState are costly set could be called once
        //  only per line, at the start; and get called only at the end
        //  of the line. This needs more infrastructure ...
        //
        public int GetNext(ref int state, out int start, out int end)
        {
                Tokens next;
            int s, e;
            s = state;        // state at start
            EolState = state;
                next = (Tokens)Scan();
            state = EolState;
            e = state;       // state at end;
            start = tokPos;
            end = tokEPos - 1; // end is the index of last char.
            return (int)next;
        }        
#endif // BABEL

        // ======== AbstractScanner<> Implementation =========

        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "yylex")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "yylex")]
        public override int yylex()
        {
            // parserMax is set by reflecting on the Tokens
            // enumeration.  If maxParseToken is defined
            // that is used, otherwise int.MaxValue is used.
            int next;
            do { next = Scan(); } while (next >= parserMax);
            return next;
        }
        
        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        int yypos { get { return tokPos; } }
        
        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        int yyline { get { return tokLin; } }
        
        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        int yycol { get { return tokCol; } }

        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "yytext")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "yytext")]
        public string yytext
        {
            get 
            {
                if (tokTxt == null) 
                    tokTxt = buffer.GetString(tokPos, tokEPos);
                return tokTxt;
            }
        }

        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        void yyless(int n)
        {
            buffer.Pos = tokPos;
            // Must read at least one char, so set before start.
            cCol = tokCol - 1; 
            GetCode();
            // Now ensure that line counting is correct.
            lNum = tokLin;
            // And count the rest of the text.
            for (int i = 0; i < n; i++) GetCode();
            MarkEnd();
        }
       
        //
        //  It would be nice to count backward in the text
        //  but it does not seem possible to re-establish
        //  the correct column counts except by going forward.
        //
        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        void _yytrunc(int n) { yyless(yyleng - n); }
        
        //
        // This is painful, but we no longer count
        // codepoints.  For the overwhelming majority 
        // of cases the single line code is fast, for
        // the others, well, at least it is all in the
        // buffer so no files are touched. Note that we
        // can't use (tokEPos - tokPos) because of the
        // possibility of surrogate pairs in the token.
        //
        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "yyleng")]
        [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "yyleng")]
        public int yyleng
        {
            get
            {
                if (tokELin == tokLin)
                    return tokECol - tokCol;
                else
                {
                    int ch;
                    int count = 0;
                    buffer.Pos = tokPos;
                    do
                    {
                        ch = buffer.Read();
                        if (!char.IsHighSurrogate((char)ch)) count++;
                    } while (buffer.Pos < tokEPos && ch != ScanBuff.EndOfFile); 
                    return count;
                }
            }
        }
        
        // ============ methods available in actions ==============

        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal int YY_START {
            get { return currentScOrd; }
            set { currentScOrd = value; 
                  currentStart = startState[value]; 
            } 
        }
        
        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal void BEGIN(int next) {
            currentScOrd = next;
            currentStart = startState[next];
        }

        // ============== The main tokenizer code =================

        int Scan()
        {
                for (; ; )
                {
                    int next;              // next state to enter                   
#if BACKUP
                    Result rslt = Result.noMatch;
#endif // BACKUP
#if LEFTANCHORS
                    for (;;)
                    {
                        // Discard characters that do not start any pattern.
                        // Must check the left anchor condition after *every* GetCode!
                        state = ((cCol == 0) ? anchorState[currentScOrd] : currentStart);
                        if ((next = NextState()) != goStart) 
                            break; // LOOP EXIT HERE...
                        GetCode();
                    }
                    
#else // !LEFTANCHORS
                    state = currentStart;
                    while ((next = NextState()) == goStart)
                        // At this point, the current character has no
                        // transition from the current state.  We discard 
                        // the "no-match" char.   In traditional LEX such 
                        // characters are echoed to the console.
                        GetCode();
#endif // LEFTANCHORS                    
                    // At last, a valid transition ...    
                    MarkToken();
                    state = next;
                    GetCode();
                    
                    while ((next = NextState()) > eofNum) // Exit for goStart AND for eofNum
#if BACKUP
                        if (state <= maxAccept && next > maxAccept) // need to prepare backup data
                        {
                            // ctx is an object. The fields may be 
                            // mutated by the call to Recurse2.
                            // On return the data in ctx is the
                            // *latest* accept state that was found.
                            
                            rslt = Recurse2(ref ctx, next);
                            if (rslt == Result.noMatch) 
                                RestoreStateAndPos(ref ctx);
                            break;
                        }
                        else
#endif // BACKUP
                        {
                            state = next;
                            GetCode();
                        }
                    if (state <= maxAccept) 
                    {
                        MarkEnd();
#region ActionSwitch
#pragma warning disable 162
    switch (state)
    {
        case eofNum:
            if (yywrap())
                return (int)Tokens.EOF;
            break;
        case 1: // Recognized '.',	Shortest string "\xA7"
        case 21: // Recognized '.',	Shortest string "\xC2"
        case 35: // Recognized '.',	Shortest string "$"
        case 162: // In <COMMENT> Recognized '.',	Shortest string "*"
        case 163: // In <COMMENT> Recognized '.',	Shortest string "/"
System.Console.WriteLine("Illegal character: <" + yytext + "> at line #" + yyline);
	Utility.error(yyline,Utility.E_UNMATCHED);
	break;
            break;
        case 2: // Recognized '"!"',	Shortest string "!"
isOperator = true; YyLine = yyline; return E_NOT;
            break;
        case 3: // Recognized '","',	Shortest string ","
isOperator = false; YyLine = yyline; return E_COLON;
            break;
        case 4: // Recognized '":"',	Shortest string ":"
isOperator = false; YyLine = yyline; return E_DOUBLEDOT;
            break;
        case 5: // Recognized '";"',	Shortest string ";"
isOperator = false; YyLine = yyline; return E_SEMICOLON;
            break;
        case 6: // Recognized '"("',	Shortest string "("
isOperator = false; YyLine = yyline; return E_PAR_OPEN;
            break;
        case 7: // Recognized '")"',	Shortest string ")"
isOperator = false; YyLine = yyline; return E_PAR_CLOSE;
            break;
        case 8: // Recognized '"["',	Shortest string "["
isOperator = false; YyLine = yyline; return E_BRACKET_OPEN;
            break;
        case 9: // Recognized '"]"',	Shortest string "]"
isOperator = false; YyLine = yyline; return E_BRACKET_CLOSE;
            break;
        case 10: // Recognized '"."',	Shortest string "."
isOperator = true; YyLine = yyline; return E_POINT;
            break;
        case 11: // Recognized '"+"',	Shortest string "+"
if( isOperator ){
		isOperator = true;
		YyLine = yyline; return E_POS;
	}
	else{
		isOperator = true;
		YyLine = yyline; return E_PLUS;
	}
            break;
        case 12: // Recognized '"-"',	Shortest string "-"
if( isOperator ){
		isOperator = true;
		YyLine = yyline; return E_NEG;
	}
	else{
		isOperator = true;
		YyLine = yyline; return E_MOINS;
	}
            break;
        case 13: // Recognized '"*"',	Shortest string "*"
isOperator = true; YyLine = yyline; return E_MULT;
            break;
        case 14: // Recognized '"/"',	Shortest string "/"
isOperator = true; YyLine = yyline; return E_DIV;
            break;
        case 15: // Recognized '"="',	Shortest string "="
isOperator = true; YyLine = yyline; return E_ASSIGN;
            break;
        case 16: // Recognized '"<"',	Shortest string "<"
isOperator = true; YyLine = yyline; return E_LESS;
            break;
        case 17: // Recognized '">"',	Shortest string ">"
isOperator = true; YyLine = yyline; return E_MORE;
            break;
        case 18: // Recognized '"&"',	Shortest string "&"
isOperator = true; YyLine = yyline; return E_BOOL_AND;
            break;
        case 19: // Recognized '"|"',	Shortest string "|"
isOperator = true; YyLine = yyline; return E_BOOL_OR;
            break;
        case 20: // Recognized '"\^"',	Shortest string "^"
isOperator = true; YyLine = yyline; return E_POW;
            break;
        case 22: // Recognized '{IDENT}',	Shortest string "E"
        case 23: // Recognized '{IDENT}',	Shortest string "V"
        case 24: // Recognized '{IDENT}',	Shortest string "T"
        case 25: // Recognized '{IDENT}',	Shortest string "S"
        case 26: // Recognized '{IDENT}',	Shortest string "B"
        case 27: // Recognized '{IDENT}',	Shortest string "C"
        case 28: // Recognized '{IDENT}',	Shortest string "D"
        case 29: // Recognized '{IDENT}',	Shortest string "F"
        case 31: // Recognized '{IDENT}',	Shortest string "W"
        case 32: // Recognized '{IDENT}',	Shortest string "I"
        case 33: // Recognized '{IDENT}',	Shortest string "L"
        case 34: // Recognized '{IDENT}',	Shortest string "G"
        case 48: // Recognized '{IDENT}',	Shortest string "GL"
        case 49: // Recognized '{IDENT}',	Shortest string "GLO"
        case 50: // Recognized '{IDENT}',	Shortest string "GLOB"
        case 51: // Recognized '{IDENT}',	Shortest string "GLOBA"
        case 52: // Recognized '{IDENT}',	Shortest string "GLOBAL"
        case 53: // Recognized '{IDENT}',	Shortest string "GLOBALV"
        case 54: // Recognized '{IDENT}',	Shortest string "GLOBALVA"
        case 56: // Recognized '{IDENT}',	Shortest string "LA"
        case 57: // Recognized '{IDENT}',	Shortest string "LAN"
        case 60: // Recognized '{IDENT}',	Shortest string "IF"
        case 62: // Recognized '{IDENT}',	Shortest string "WH"
        case 63: // Recognized '{IDENT}',	Shortest string "WHI"
        case 64: // Recognized '{IDENT}',	Shortest string "WHIL"
        case 65: // Recognized '{IDENT}',	Shortest string "WHILE"
        case 67: // Recognized '{IDENT}',	Shortest string "FO"
        case 68: // Recognized '{IDENT}',	Shortest string "FOR"
        case 70: // Recognized '{IDENT}',	Shortest string "FORE"
        case 71: // Recognized '{IDENT}',	Shortest string "FOREA"
        case 72: // Recognized '{IDENT}',	Shortest string "FOREAC"
        case 73: // Recognized '{IDENT}',	Shortest string "FOREACH"
        case 75: // Recognized '{IDENT}',	Shortest string "DE"
        case 76: // Recognized '{IDENT}',	Shortest string "DEF"
        case 77: // Recognized '{IDENT}',	Shortest string "DEFA"
        case 78: // Recognized '{IDENT}',	Shortest string "DEFAU"
        case 79: // Recognized '{IDENT}',	Shortest string "DEFAUL"
        case 81: // Recognized '{IDENT}',	Shortest string "CA"
        case 82: // Recognized '{IDENT}',	Shortest string "CO"
        case 83: // Recognized '{IDENT}',	Shortest string "CON"
        case 84: // Recognized '{IDENT}',	Shortest string "CONS"
        case 86: // Recognized '{IDENT}',	Shortest string "CAT"
        case 87: // Recognized '{IDENT}',	Shortest string "CAS"
        case 89: // Recognized '{IDENT}',	Shortest string "CATC"
        case 90: // Recognized '{IDENT}',	Shortest string "CATCH"
        case 91: // Recognized '{IDENT}',	Shortest string "CATCHE"
        case 92: // Recognized '{IDENT}',	Shortest string "CATCHS"
        case 93: // Recognized '{IDENT}',	Shortest string "SU"
        case 95: // Recognized '{IDENT}',	Shortest string "EV"
        case 96: // Recognized '{IDENT}',	Shortest string "EVE"
        case 97: // Recognized '{IDENT}',	Shortest string "EVEN"
        case 98: // Recognized '{IDENT}',	Shortest string "BR"
        case 99: // Recognized '{IDENT}',	Shortest string "BRE"
        case 100: // Recognized '{IDENT}',	Shortest string "BREA"
        case 102: // Recognized '{IDENT}',	Shortest string "SW"
        case 103: // Recognized '{IDENT}',	Shortest string "SWI"
        case 104: // Recognized '{IDENT}',	Shortest string "SWIT"
        case 105: // Recognized '{IDENT}',	Shortest string "SWITC"
        case 106: // Recognized '{IDENT}',	Shortest string "SWITCH"
        case 108: // Recognized '{IDENT}',	Shortest string "TH"
        case 109: // Recognized '{IDENT}',	Shortest string "THE"
        case 111: // Recognized '{IDENT}',	Shortest string "EN"
        case 112: // Recognized '{IDENT}',	Shortest string "EL"
        case 113: // Recognized '{IDENT}',	Shortest string "ELS"
        case 115: // Recognized '{IDENT}',	Shortest string "END"
        case 116: // Recognized '{IDENT}',	Shortest string "ENDS"
        case 117: // Recognized '{IDENT}',	Shortest string "ENDC"
        case 118: // Recognized '{IDENT}',	Shortest string "ENDF"
        case 119: // Recognized '{IDENT}',	Shortest string "ENDW"
        case 120: // Recognized '{IDENT}',	Shortest string "ENDI"
        case 121: // Recognized '{IDENT}',	Shortest string "ENDL"
        case 122: // Recognized '{IDENT}',	Shortest string "ENDLA"
        case 123: // Recognized '{IDENT}',	Shortest string "ENDLAN"
        case 126: // Recognized '{IDENT}',	Shortest string "ENDWH"
        case 127: // Recognized '{IDENT}',	Shortest string "ENDWHI"
        case 128: // Recognized '{IDENT}',	Shortest string "ENDWHIL"
        case 130: // Recognized '{IDENT}',	Shortest string "ENDFO"
        case 132: // Recognized '{IDENT}',	Shortest string "ENDFORE"
        case 133: // Recognized '{IDENT}',	Shortest string "ENDFOREA"
        case 134: // Recognized '{IDENT}',	Shortest string "ENDFOREAC"
        case 136: // Recognized '{IDENT}',	Shortest string "ENDCA"
        case 137: // Recognized '{IDENT}',	Shortest string "ENDCAT"
        case 138: // Recognized '{IDENT}',	Shortest string "ENDCATC"
        case 139: // Recognized '{IDENT}',	Shortest string "ENDCATCH"
        case 140: // Recognized '{IDENT}',	Shortest string "ENDE"
        case 141: // Recognized '{IDENT}',	Shortest string "ENDCATCHS"
        case 142: // Recognized '{IDENT}',	Shortest string "ENDSU"
        case 144: // Recognized '{IDENT}',	Shortest string "ENDEV"
        case 145: // Recognized '{IDENT}',	Shortest string "ENDEVE"
        case 146: // Recognized '{IDENT}',	Shortest string "ENDEVEN"
        case 147: // Recognized '{IDENT}',	Shortest string "ENDSW"
        case 148: // Recognized '{IDENT}',	Shortest string "ENDSWI"
        case 149: // Recognized '{IDENT}',	Shortest string "ENDSWIT"
        case 150: // Recognized '{IDENT}',	Shortest string "ENDSWITC"
isOperator = false; YyLine = yyline; return E_IDENT;
            break;
        case 30: // Recognized '{NONNEWLINE_WHITE_SPACE_CHAR}+',	Shortest string "\n"
        case 180: // In <STVARRAY> Recognized '{NONNEWLINE_WHITE_SPACE_CHAR}+',	Shortest string "\n"
        case 189: // In <STFUNCTION> Recognized '{NONNEWLINE_WHITE_SPACE_CHAR}+',	Shortest string "\n"
{ }
            break;
        case 36: // Recognized '{DIGIT}+',	Shortest string "0"
isOperator = false; YyLine = yyline; return E_INTEGER;
            break;
        case 37: // Recognized '\"{STRING_TEXT}',	Shortest string "\""
        case 40: // Recognized '\"{STRING_TEXT}',	Shortest string "\"\\"
        case 42: // Recognized '\"{STRING_TEXT}',	Shortest string "\"\\\x08"
Utility.assert(false,"Unclosed string");
	break;
            break;
        case 38: // Recognized '"#"',	Shortest string "#"
BEGIN(COMMENTSHARP);break;
            break;
        case 39: // Recognized '\"{STRING_TEXT}\"',	Shortest string "\"\""
        case 41: // Recognized '\"{STRING_TEXT}\"',	Shortest string "\"\\\""
string str =  yytext.Substring(1,yytext.Length - 2);

	Utility.assert(str.Length == yytext.Length - 2, "Error on '\"'");
//	Console.WriteLine( "String " + yytext);
	isOperator = false; YyLine = yyline; return E_STRING;
            break;
        case 43: // Recognized '{DIGIT}+"."{DIGIT}+',	Shortest string "0.0"
isOperator = false; YyLine = yyline; return E_FLOAT;
            break;
        case 44: // Recognized '{DIGIT}+"."{DIGIT}+"."{DIGIT}+"."{DIGIT}+',	Shortest string "0.0.0.0"
isOperator = false; YyLine = yyline; return E_IP;
            break;
        case 45: // Recognized '{VAR}',	Shortest string "$E"
isOperator = false; YyLine = yyline; return E_VAR;
            break;
        case 46: // Recognized '{VARARRAY}',	Shortest string "$E["
BEGIN(STVARRAY);
	brack_count = 1;
	par_count = 0;
	strBloc = yytext;
	args.Clear();
	strParam = "";
	break;
            break;
        case 47: // Recognized '{FUNCTION}',	Shortest string "E("
BEGIN(STFUNCTION);
	brack_count = 0;
	par_count = 1;
	strBloc = yytext;
	args.Clear();
	strParam = "";
	myFunc = yytext;
	break;
            break;
        case 55: // Recognized '[gG][lL][oO][bB][aA][lL][vV][aA][rR]',	Shortest string "GLOBALVAR"
isOperator = false; YyLine = yyline; return E_GLOBALVAR;
            break;
        case 58: // Recognized '[lL][aA][nN][gG]',	Shortest string "LANG"
isOperator = false; YyLine = yyline; return E_LANG;
            break;
        case 59: // Recognized '[iI][nN]',	Shortest string "IN"
isOperator = false; YyLine = yyline; return E_IN;
            break;
        case 61: // Recognized '[iI][fF]({WHITE_SPACE_CHAR})*\(',	Shortest string "IF("
isOperator = false; YyLine = yyline; return E_IF;
            break;
        case 66: // Recognized '[wW][hH][iI][lL][eE]({WHITE_SPACE_CHAR})*\(',	Shortest string "WHILE("
isOperator = false; YyLine = yyline; return E_WHILE;
            break;
        case 69: // Recognized '[fF][oO][rR]({WHITE_SPACE_CHAR})*\(',	Shortest string "FOR("
isOperator = false; YyLine = yyline; return E_FOR;
            break;
        case 74: // Recognized '[fF][oO][rR][eE][aA][cC][hH]({WHITE_SPACE_CHAR})*\(',	Shortest string "FOREACH("
isOperator = false; YyLine = yyline; return E_FOREACH;
            break;
        case 80: // Recognized '[dD][eE][fF][aA][uU][lL][tT]',	Shortest string "DEFAULT"
isOperator = false; YyLine = yyline; return E_DEFAULT;
            break;
        case 85: // Recognized '[cC][oO][nN][sS][tT]',	Shortest string "CONST"
isOperator = false; YyLine = yyline; return E_CONST;
            break;
        case 88: // Recognized '[cC][aA][sS][eE]',	Shortest string "CASE"
isOperator = false; YyLine = yyline; return E_CASE;
            break;
        case 94: // Recognized '[eE][vV][eE][nN][tT]|[sS][uU][bB]|[cC][aA][tT][cC][hH][eE][vV][eE][nN][tT]|[cC][aA][tT][cC][hH][sS][uU][bB]',	Shortest string "SUB"
isOperator = false; YyLine = yyline; return E_BEGIN_FUNCTION;
            break;
        case 101: // Recognized '[bB][rR][eE][aA][kK]',	Shortest string "BREAK"
isOperator = false; YyLine = yyline; return E_BREAK;
            break;
        case 107: // Recognized '[sS][wW][iI][tT][cC][hH]({WHITE_SPACE_CHAR})*\(',	Shortest string "SWITCH("
isOperator = false; YyLine = yyline; return E_SWITCH;
            break;
        case 110: // Recognized '[tT][hH][eE][nN]',	Shortest string "THEN"
isOperator = false; YyLine = yyline; return E_THEN;
            break;
        case 114: // Recognized '[eE][lL][sS][eE]',	Shortest string "ELSE"
isOperator = false; YyLine = yyline; return E_ELSE;
            break;
        case 124: // Recognized '[eE][nN][dD][lL][aA][nN][gG]',	Shortest string "ENDLANG"
isOperator = false; YyLine = yyline; return E_ENDLANG;
            break;
        case 125: // Recognized '[eE][nN][dD][iI][fF]',	Shortest string "ENDIF"
isOperator = false; YyLine = yyline; return E_ENDIF;
            break;
        case 129: // Recognized '[eE][nN][dD][wW][hH][iI][lL][eE]',	Shortest string "ENDWHILE"
isOperator = false; YyLine = yyline; return E_ENDWHILE;
            break;
        case 131: // Recognized '[eE][nN][dD][fF][oO][rR]',	Shortest string "ENDFOR"
isOperator = false; YyLine = yyline; return E_ENDFOR;
            break;
        case 135: // Recognized '[eE][nN][dD][fF][oO][rR][eE][aA][cC][hH]',	Shortest string "ENDFOREACH"
isOperator = false; YyLine = yyline; return E_ENDFOREACH;
            break;
        case 143: // Recognized '[eE][nN][dD][eE][vV][eE][nN][tT]|[eE][nN][dD][sS][uU][bB]|[eE][nN][dD][cC][aA][tT][cC][hH][eE][vV][eE][nN][tT]|[eE][nN][dD][cC][aA][tT][cC][hH][sS][uU][bB]',	Shortest string "ENDSUB"
isOperator = false; YyLine = yyline; return E_END_FUNCTION;
            break;
        case 151: // Recognized '[eE][nN][dD][sS][wW][iI][tT][cC][hH]',	Shortest string "ENDSWITCH"
isOperator = false; YyLine = yyline; return E_ENDSWITCH;
            break;
        case 152: // Recognized '"Â§"',	Shortest string "\xC2\xA7"
isOperator = false; YyLine = yyline; return 23;
            break;
        case 153: // Recognized '"||"',	Shortest string "||"
isOperator = true; YyLine = yyline; return E_OR;
            break;
        case 154: // Recognized '"&&"',	Shortest string "&&"
isOperator = true; YyLine = yyline; return E_AND;
            break;
        case 155: // Recognized '">="',	Shortest string ">="
isOperator = true; YyLine = yyline; return E_MORE_EQUAL;
            break;
        case 156: // Recognized '"<="',	Shortest string "<="
isOperator = true; YyLine = yyline; return E_LESS_EQUAL;
            break;
        case 157: // Recognized '"<>"',	Shortest string "<>"
isOperator = true; YyLine = yyline; return E_DIFF;
            break;
        case 158: // Recognized '"=="',	Shortest string "=="
isOperator = true; YyLine = yyline; return E_EQUAL;
            break;
        case 159: // Recognized '"/*"',	Shortest string "/*"
BEGIN(COMMENT); comment_count = comment_count + 1;break;
            break;
        case 160: // Recognized '"!="',	Shortest string "!="
isOperator = true; YyLine = yyline; return E_DIFF;
            break;
        case 161: // In <COMMENT> Recognized '{COMMENT_TEXT}',	Shortest string ""
        case 164: // In <COMMENT> Recognized '{COMMENT_TEXT}',	Shortest string "!"
        case 166: // In <COMMENT> Recognized '{COMMENT_TEXT}',	Shortest string "//"
        case 167: // In <COMMENT> Recognized '{COMMENT_TEXT}',	Shortest string "**"
{ }
            break;
        case 165: // In <COMMENT> Recognized '"/*"',	Shortest string "/*"
comment_count = comment_count + 1;break;
            break;
        case 168: // In <COMMENT> Recognized '"*/"',	Shortest string "*/"
comment_count = comment_count - 1;
	Utility.assert(comment_count >= 0, "To much ')'");
	if (comment_count == 0) {
    		BEGIN(INITIAL);

	}
	break;
            break;
        case 169: // In <COMMENTSHARP> Recognized '{COMMENT_TEXT_SHARP}',	Shortest string ""
        case 170: // In <COMMENTSHARP> Recognized '{COMMENT_TEXT_SHARP}',	Shortest string "!"
{ }
            break;
        case 171: // In <COMMENTSHARP> Recognized '"\n"',	Shortest string "\n"
BEGIN(INITIAL);break;
            break;
        case 172: // In <STVARRAY> Recognized '{BLOC_ARRAY}',	Shortest string ""
        case 173: // In <STVARRAY> Recognized '{BLOC_ARRAY}',	Shortest string "!"
strBloc+=yytext;strParam+=yytext;break;
            break;
        case 174: // In <STVARRAY> Recognized '","',	Shortest string ","
strBloc+=yytext;
	if( brack_count == 1 && par_count == 0 ){
	    args.Add( strParam.Trim() );
	    strParam = "";
	}
	else
	    strParam+=yytext;
	break;
            break;
        case 175: // In <STVARRAY> Recognized '";"',	Shortest string ";"
strBloc+=yytext;
	    BEGIN(INITIAL);
		Utility.assert(par_count >= 0 || brack_count > 0, "'[' not closed");
	    break;
            break;
        case 176: // In <STVARRAY> Recognized '"("',	Shortest string "("
strBloc+=yytext;
    strParam+=yytext;
	par_count++;
	break;
            break;
        case 177: // In <STVARRAY> Recognized '")"',	Shortest string ")"
strBloc+=yytext;
    strParam+=yytext;
	par_count--;
	break;
            break;
        case 178: // In <STVARRAY> Recognized '"["',	Shortest string "["
brack_count += 1;
	strBloc+="[";
    strParam+=yytext;
	break;
            break;
        case 179: // In <STVARRAY> Recognized '"]"',	Shortest string "]"
brack_count -= 1;
	strBloc+="]";
	if( brack_count == 0 ){
	    args.Add( strParam.Trim() );
	    BEGIN(INITIAL);
	    isOperator = false; YyLine = yyline; return E_ARVAR;
	}
	else
	    strParam+=yytext;

	break;
            break;
        case 181: // In <STFUNCTION> Recognized '{BLOC_FUNCTION}',	Shortest string ""
        case 182: // In <STFUNCTION> Recognized '{BLOC_FUNCTION}',	Shortest string "!"
strBloc+=yytext;
	strParam+=yytext;
	break;
            break;
        case 183: // In <STFUNCTION> Recognized '","',	Shortest string ","
strBloc+=yytext;
	if( par_count == 1 && brack_count == 0 ){
	    args.Add( strParam.Trim() );
	    strParam = "";
	}
	else
	    strParam+=yytext;
	break;
            break;
        case 184: // In <STFUNCTION> Recognized '";"',	Shortest string ";"
strBloc+=yytext;
	    BEGIN(INITIAL);
		Utility.assert(par_count >= 0 || brack_count > 0, "'(' not closed");
	    break;
            break;
        case 185: // In <STFUNCTION> Recognized '"("',	Shortest string "("
par_count += 1;
	strBloc+=yytext;
    strParam+=yytext;
	break;
            break;
        case 186: // In <STFUNCTION> Recognized '")"',	Shortest string ")"
par_count -= 1;
	strBloc+=yytext;
	if( par_count == 0 ){
	    if( strParam.Trim() != "" )
	    	args.Add( strParam.Trim() );
	    
	    strParam = "";
	    BEGIN(INITIAL);
//	    Console.WriteLine( "end function : " + myFunc + string.Join( ",",(string[])args.ToArray(typeof(string)) ) + ")\n");
	    isOperator = false;
		YyLine = yyline; return E_FUNCTION;
	}
	else
	    strParam+=yytext;

	break;
            break;
        case 187: // In <STFUNCTION> Recognized '"["',	Shortest string "["
strBloc+=yytext;
    strParam+=yytext;
	brack_count++;
	break;
            break;
        case 188: // In <STFUNCTION> Recognized '"]"',	Shortest string "]"
strBloc+=yytext;
    strParam+=yytext;
	brack_count--;
	break;
            break;
        case 190: // In <STFUNCTION> Recognized '\"{STRING_TEXT}',	Shortest string "\""
        case 192: // In <STFUNCTION> Recognized '\"{STRING_TEXT}',	Shortest string "\"\\"
        case 194: // In <STFUNCTION> Recognized '\"{STRING_TEXT}',	Shortest string "\"\\\x08"
strBloc+=yytext;
    	strParam+=yytext;

//	Console.WriteLine( "String " + yytext);

//	Utility.error(yyline,Utility.E_UNCLOSEDSTR);
	Utility.assert(false,"Unclosed string");
	break;
            break;
        case 191: // In <STFUNCTION> Recognized '\"{STRING_TEXT}\"',	Shortest string "\"\""
        case 193: // In <STFUNCTION> Recognized '\"{STRING_TEXT}\"',	Shortest string "\"\\\""
{
		string str1 =  yytext.Substring(1,yytext.Length - 2);
	    strBloc+=yytext;
    	strParam+=yytext;
		Utility.assert(str1.Length == yytext.Length - 2, "Error on '\"'");
//		Console.WriteLine( "String " + yytext);
		break;
	}
            break;
        default:
            break;
    }
#pragma warning restore 162
#endregion
                    }
                }
        }

#if BACKUP
        Result Recurse2(ref Context ctx, int next)
        {
            // Assert: at entry "state" is an accept state AND
            //         NextState(state, code) != goStart AND
            //         NextState(state, code) is not an accept state.
            //
            SaveStateAndPos(ref ctx);
            state = next;
            GetCode();

            while ((next = NextState()) > eofNum)
            {
                if (state <= maxAccept && next > maxAccept) // need to update backup data
                    SaveStateAndPos(ref ctx);
                state = next;
                if (state == eofNum) return Result.accept;
                GetCode(); 
            }
            return (state <= maxAccept ? Result.accept : Result.noMatch);
        }

        void SaveStateAndPos(ref Context ctx)
        {
            ctx.bPos  = buffer.Pos;
            ctx.rPos  = readPos;
            ctx.cCol  = cCol;
            ctx.lNum  = lNum;
            ctx.state = state;
            ctx.cChr  = code;
        }

        void RestoreStateAndPos(ref Context ctx)
        {
            buffer.Pos = ctx.bPos;
            readPos = ctx.rPos;
            cCol  = ctx.cCol;
            lNum  = ctx.lNum;
            state = ctx.state;
            code  = ctx.cChr;
        }

#endif // BACKUP

        // ============= End of the tokenizer code ================

#if STACK        
        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal void yy_clear_stack() { scStack.Clear(); }
        
        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal int yy_top_state() { return scStack.Peek(); }
        
        internal void yy_push_state(int state)
        {
            scStack.Push(currentScOrd);
            BEGIN(state);
        }
        
        internal void yy_pop_state()
        {
            // Protect against input errors that pop too far ...
            if (scStack.Count > 0) {
				int newSc = scStack.Pop();
				BEGIN(newSc);
            } // Otherwise leave stack unchanged.
        }
 #endif // STACK

        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal void ECHO() { Console.Out.Write(yytext); }
        
#region UserCodeSection

/* bool comment_sharp = false; */
int comment_count = 0;
int brack_count = 0;
int par_count = 0;
string strParam = "";
public string strBloc = "";
string myFunc = "";
bool isOperator = false;
public int YyLine = 0;
public System.Collections.ArrayList args = new System.Collections.ArrayList();
/*
class Sample {
    public static void Main(string[] argv)  {
        try
        {
            int tok;
            FileStream file = new FileStream("LFSLapper.cfg", FileMode.Open);
            Scanner scnr = new Scanner(file);
             do {
                 tok = scnr.yylex();
                 Console.WriteLine("#"+tok + ": " + scnr.yytext);
             } while (tok > (int)Tokens.EOF);
        }
        catch (System.Exception e)
        {
            Console.WriteLine(e.Message);
        }
                Console.ReadKey();
    }

}
*/
public const int E_END = 0;
public const int E_DOUBLEDOT = 1;
public const int E_SEMICOLON = 2;
public const int E_PAR_OPEN = 3;
public const int E_PAR_CLOSE = 4;
public const int E_BRACKET_OPEN = 5;
public const int E_BRACKET_CLOSE = 6;
public const int E_POINT = 9;
public const int E_PLUS = 10;
public const int E_MOINS = 11;
public const int E_MULT = 12;
public const int E_DIV = 13;
public const int E_EQUAL = 14;
public const int E_DIFF = 15;
public const int E_LESS = 16;
public const int E_LESS_EQUAL = 17;
public const int E_MORE = 18;
public const int E_MORE_EQUAL = 19;
public const int E_AND = 20;
public const int E_OR = 21;
public const int E_POW = 22;
public const int E_COLON = 24;
public const int E_INTEGER = 50;
public const int E_STRING = 40;
public const int E_ASSIGN = 42;
public const int E_IDENT = 43;
public const int E_IP = 45;
public const int E_FLOAT = 46;
public const int E_VAR = 47;
public const int E_BLOC = 48;
public const int E_BEGIN_FUNCTION = 100;
public const int E_END_FUNCTION = 101;
public const int E_IF = 102;
public const int E_THEN = 103;
public const int E_ELSE = 104;
public const int E_ENDIF = 105;
public const int E_GLOBALVAR = 106;
public const int E_PLAYERVAR = 107;
public const int E_WHILE = 108;
public const int E_ENDWHILE = 109;
public const int E_FOR = 110;
public const int E_ENDFOR = 111;
public const int E_BREAK = 112;
public const int E_SWITCH = 113;
public const int E_ENDSWITCH = 114;
public const int E_CASE = 115;
public const int E_DEFAULT = 116;
public const int E_BOOL_AND = 117;
public const int E_BOOL_OR = 118;
public const int E_LANG = 119;
public const int E_ENDLANG = 120;
public const int E_FOREACH = 121;
public const int E_ENDFOREACH = 122;
public const int E_IN = 123;
public const int E_CONST = 124;
public const int E_ARVAR = 125;
public const int E_FUNCTION = 126;
public const int E_NOT = 127;
public const int E_NEG = 128;
public const int E_POS = 129;
class Utility {
  public static void assert( bool expr, string errMsg )
  {
		if (false == expr) {
		  throw (new System.Exception("Error: " + errMsg));
		}
  }
  private static readonly string[] errorMsg =new string[] {
    "Error: Unmatched end-of-comment punctuation.",
    "Error: Unmatched start-of-comment punctuation.",
    "Error: Unclosed string.",
    "Error: Illegal character."
    };

  public const int E_ENDCOMMENT = 0;
  public const int E_STARTCOMMENT = 1;
  public const int E_UNCLOSEDSTR = 2;
  public const int E_UNMATCHED = 3;
  

  public static void error(int yy,int code)
      {
	System.Console.WriteLine(errorMsg[code] + " at line #" + yy);
      }
}

#endregion
    } // end class $Scanner

// ==============================================================
// <auto-generated>
// This code automatically produced from an embedded resource.
// Do not edit this file, or it will become incompatible with 
// the specification from which it was generated.
// </auto-generated>
// ==============================================================

// Code copied from GPLEX embedded resource
    [Serializable]
    public class BufferException : Exception
    {
        public BufferException() { }
        public BufferException(string message) : base(message) { }
        public BufferException(string message, Exception innerException)
            : base(message, innerException) { }
        protected BufferException(SerializationInfo info, StreamingContext context)
            : base(info, context) { }
    }

    public abstract class ScanBuff
    {
        private string fileNm;

        public const int EndOfFile = -1;
        public const int UnicodeReplacementChar = 0xFFFD;

        public bool IsFile { get { return (fileNm != null); } }
        public string FileName { get { return fileNm; } set { fileNm = value; } }

        public abstract int Pos { get; set; }
        public abstract int Read();
        public virtual void Mark() { }

        public abstract string GetString(int begin, int limit);

        public static ScanBuff GetBuffer(string source)
        {
            return new StringBuffer(source);
        }

        public static ScanBuff GetBuffer(IList<string> source)
        {
            return new LineBuffer(source);
        }

        public static ScanBuff GetBuffer(Stream source)
        {
            return new BuildBuffer(source);
        }

#if (!BYTEMODE)
        public static ScanBuff GetBuffer(Stream source, int fallbackCodePage)
        {
            return new BuildBuffer(source, fallbackCodePage);
        }
#endif
    }

    #region Buffer classes

    // ==============================================================
    // =====  Definitions for various ScanBuff derived classes   ====
    // ==============================================================
    // ===============         String input          ================
    // ==============================================================

    /// <summary>
    /// This class reads characters from a single string as
    /// required, for example, by Visual Studio language services
    /// </summary>
    sealed class StringBuffer : ScanBuff
    {
        string str;        // input buffer
        int bPos;          // current position in buffer
        int sLen;

        public StringBuffer(string source)
        {
            this.str = source;
            this.sLen = source.Length;
            this.FileName = null;
        }

        public override int Read()
        {
            if (bPos < sLen) return str[bPos++];
            else if (bPos == sLen) { bPos++; return '\n'; }   // one strike, see new line
            else { bPos++; return EndOfFile; }                // two strikes and you're out!
        }

        public override string GetString(int begin, int limit)
        {
            //  "limit" can be greater than sLen with the BABEL
            //  option set.  Read returns a "virtual" EOL if
            //  an attempt is made to read past the end of the
            //  string buffer.  Without the guard any attempt 
            //  to fetch yytext for a token that includes the 
            //  EOL will throw an index exception.
            if (limit > sLen) limit = sLen;
            if (limit <= begin) return "";
            else return str.Substring(begin, limit - begin);
        }

        public override int Pos
        {
            get { return bPos; }
            set { bPos = value; }
        }

        public override string ToString() { return "StringBuffer"; }
    }

    // ==============================================================
    //  The LineBuff class contributed by Nigel Horspool, 
    //  nigelh@cs.uvic.cs
    // ==============================================================

    sealed class LineBuffer : ScanBuff
    {
        IList<string> line;    // list of source lines from a file
        int numLines;          // number of strings in line list
        string curLine;        // current line in that list
        int cLine;             // index of current line in the list
        int curLen;            // length of current line
        int curLineStart;      // position of line start in whole file
        int curLineEnd;        // position of line end in whole file
        int maxPos;            // max position ever visited in whole file
        int cPos;              // ordinal number of code in source

        // Constructed from a list of strings, one per source line.
        // The lines have had trailing '\n' characters removed.
        public LineBuffer(IList<string> lineList)
        {
            line = lineList;
            numLines = line.Count;
            cPos = curLineStart = 0;
            curLine = (numLines > 0 ? line[0] : "");
            maxPos = curLineEnd = curLen = curLine.Length;
            cLine = 1;
            FileName = null;
        }

        public override int Read()
        {
            if (cPos < curLineEnd)
                return curLine[cPos++ - curLineStart];
            if (cPos++ == curLineEnd)
                return '\n';
            if (cLine >= numLines)
                return EndOfFile;
            curLine = line[cLine];
            curLen = curLine.Length;
            curLineStart = curLineEnd + 1;
            curLineEnd = curLineStart + curLen;
            if (curLineEnd > maxPos)
                maxPos = curLineEnd;
            cLine++;
            return curLen > 0 ? curLine[0] : '\n';
        }

        // To speed up searches for the line containing a position
        private int cachedPosition;
        private int cachedIxdex;
        private int cachedLineStart;

        // Given a position pos within the entire source, the results are
        //   ix     -- the index of the containing line
        //   lstart -- the position of the first character on that line
        private void findIndex(int pos, out int ix, out int lstart)
        {
            if (pos >= cachedPosition)
            {
                ix = cachedIxdex; lstart = cachedLineStart;
            }
            else
            {
                ix = lstart = 0;
            }
            for (; ; )
            {
                int len = line[ix].Length + 1;
                if (pos < lstart + len) break;
                lstart += len;
                ix++;
            }
            cachedPosition = pos;
            cachedIxdex = ix;
            cachedLineStart = lstart;
        }

        public override string GetString(int begin, int limit)
        {
            if (begin >= maxPos || limit <= begin) return "";
            int endIx, begIx, endLineStart, begLineStart;
            findIndex(begin, out begIx, out begLineStart);
            int begCol = begin - begLineStart;
            findIndex(limit, out endIx, out endLineStart);
            int endCol = limit - endLineStart;
            string s = line[begIx];
            if (begIx == endIx)
            {
                // the usual case, substring all on one line
                return (endCol <= s.Length) ?
                    s.Substring(begCol, endCol - begCol)
                    : s.Substring(begCol) + "\n";
            }
            // the string spans multiple lines, yuk!
            StringBuilder sb = new StringBuilder();
            if (begCol < s.Length)
                sb.Append(s.Substring(begCol));
            for (; ; )
            {
                sb.Append("\n");
                s = line[++begIx];
                if (begIx >= endIx) break;
                sb.Append(s);
            }
            if (endCol <= s.Length)
            {
                sb.Append(s.Substring(0, endCol));
            }
            else
            {
                sb.Append(s);
                sb.Append("\n");
            }
            return sb.ToString();
        }

        public override int Pos
        {
            get { return cPos; }
            set
            {
                cPos = value;
                findIndex(cPos, out cLine, out curLineStart);
                curLine = line[cLine];
                curLineEnd = curLineStart + curLine.Length;
            }
        }

        public override string ToString() { return "LineBuffer"; }
    }


    // ==============================================================
    // =====     class BuildBuff : for unicode text files    ========
    // ==============================================================

    class BuildBuffer : ScanBuff
    {
        // Double buffer for char stream.
        class BufferElement
        {
            StringBuilder bldr = new StringBuilder();
            StringBuilder next = new StringBuilder();
            int minIx;
            int maxIx;
            int brkIx;
            bool appendToNext;

            internal BufferElement() { }

            internal int MaxIndex { get { return maxIx; } }
            // internal int MinIndex { get { return minIx; } }

            internal char this[int index]
            {
                get
                {
                    if (index < minIx || index >= maxIx)
                        throw new BufferException("Index was outside data buffer");
                    else if (index < brkIx)
                        return bldr[index - minIx];
                    else
                        return next[index - brkIx];
                }
            }

            internal void Append(char[] block, int count)
            {
                maxIx += count;
                if (appendToNext)
                    this.next.Append(block, 0, count);
                else
                {
                    this.bldr.Append(block, 0, count);
                    brkIx = maxIx;
                    appendToNext = true;
                }
            }

            internal string GetString(int start, int limit)
            {
                if (limit <= start)
                    return "";
                if (start >= minIx && limit <= maxIx)
                    if (limit < brkIx) // String entirely in bldr builder
                        return bldr.ToString(start - minIx, limit - start);
                    else if (start >= brkIx) // String entirely in next builder
                        return next.ToString(start - brkIx, limit - start);
                    else // Must do a string-concatenation
                        return
                            bldr.ToString(start - minIx, brkIx - start) +
                            next.ToString(0, limit - brkIx);
                else
                    throw new BufferException("String was outside data buffer");
            }

            internal void Mark(int limit)
            {
                if (limit > brkIx + 16) // Rotate blocks
                {
                    StringBuilder temp = bldr;
                    bldr = next;
                    next = temp;
                    next.Length = 0;
                    minIx = brkIx;
                    brkIx = maxIx;
                }
            }
        }

        BufferElement data = new BufferElement();

        int bPos;            // Postion index in the StringBuilder
        BlockReader NextBlk; // Delegate that serves char-arrays;

        private string EncodingName
        {
            get
            {
                StreamReader rdr = NextBlk.Target as StreamReader;
                return (rdr == null ? "raw-bytes" : rdr.CurrentEncoding.BodyName);
            }
        }

        public BuildBuffer(Stream stream)
        {
            FileStream fStrm = (stream as FileStream);
            if (fStrm != null) FileName = fStrm.Name;
            NextBlk = BlockReaderFactory.Raw(stream);
        }

#if (!BYTEMODE)
        public BuildBuffer(Stream stream, int fallbackCodePage)
        {
            FileStream fStrm = (stream as FileStream);
            if (fStrm != null) FileName = fStrm.Name;
            NextBlk = BlockReaderFactory.Get(stream, fallbackCodePage);
        }
#endif

        /// <summary>
        /// Marks a conservative lower bound for the buffer,
        /// allowing space to be reclaimed.  If an application 
        /// needs to call GetString at arbitrary past locations 
        /// in the input stream, Mark() is not called.
        /// </summary>
        public override void Mark() { data.Mark(bPos - 2); }

        public override int Pos
        {
            get { return bPos; }
            set { bPos = value; }
        }


        /// <summary>
        /// Read returns the ordinal number of the next char, or 
        /// EOF (-1) for an end of stream.  Note that the next
        /// code point may require *two* calls of Read().
        /// </summary>
        /// <returns></returns>
        public override int Read()
        {
            //
            //  Characters at positions 
            //  [data.offset, data.offset + data.bldr.Length)
            //  are available in data.bldr.
            //
            if (bPos < data.MaxIndex)
            {
                // ch0 cannot be EOF
                return (int)data[bPos++];
            }
            else // Read from underlying stream
            {
                // Experimental code, blocks of page size
                char[] chrs = new char[4096];
                int count = NextBlk(chrs, 0, 4096);
                if (count == 0)
                    return EndOfFile;
                else
                {
                    data.Append(chrs, count);
                    return (int)data[bPos++];
                }
            }
        }

        public override string GetString(int begin, int limit)
        {
            return data.GetString(begin, limit);
        }

        public override string ToString()
        {
            return "StringBuilder buffer, encoding: " + this.EncodingName;
        }
    }

    // =============== End ScanBuff-derived classes ==================

    public delegate int BlockReader(char[] block, int index, int number);

    // A delegate factory, serving up a delegate that
    // reads a block of characters from the underlying
    // encoded stream, via a StreamReader object.
    //
    public static class BlockReaderFactory
    {
        public static BlockReader Raw(Stream stream)
        {
            return delegate(char[] block, int index, int number)
            {
                byte[] b = new byte[number];
                int count = stream.Read(b, 0, number);
                int i = 0;
                int j = index;
                for (; i < count; i++, j++)
                    block[j] = (char)b[i];
                return count;
            };
        }

#if (!BYTEMODE)
        public static BlockReader Get(Stream stream, int fallbackCodePage)
        {
            Encoding encoding;
            int preamble = Preamble(stream);

            if (preamble != 0)  // There is a valid BOM here!
                encoding = Encoding.GetEncoding(preamble);
            else if (fallbackCodePage == -1) // Fallback is "raw" bytes
                return Raw(stream);
            else if (fallbackCodePage != -2) // Anything but "guess"
                encoding = Encoding.GetEncoding(fallbackCodePage);
            else // This is the "guess" option
            {
                int guess = new Guesser(stream).GuessCodePage();
                stream.Seek(0, SeekOrigin.Begin);
                if (guess == -1) // ==> this is a 7-bit file
                    encoding = Encoding.ASCII;
                else if (guess == 65001)
                    encoding = Encoding.UTF8;
                else             // ==> use the machine default
                    encoding = Encoding.Default;
            }
            StreamReader reader = new StreamReader(stream, encoding);
            return reader.Read;
        }

        static int Preamble(Stream stream)
        {
            int b0 = stream.ReadByte();
            int b1 = stream.ReadByte();

            if (b0 == 0xfe && b1 == 0xff)
                return 1201; // UTF16BE
            if (b0 == 0xff && b1 == 0xfe)
                return 1200; // UTF16LE

            int b2 = stream.ReadByte();
            if (b0 == 0xef && b1 == 0xbb && b2 == 0xbf)
                return 65001; // UTF8
            //
            // There is no unicode preamble, so we
            // return denoter for the machine default.
            //
            stream.Seek(0, SeekOrigin.Begin);
            return 0;
        }
#endif // !BYTEMODE
    }
    #endregion Buffer classes

    // ==============================================================
    // ============      class CodePageHandling         =============
    // ==============================================================

    public static class CodePageHandling
    {
        public static int GetCodePage(string option)
        {
            string command = option.ToUpperInvariant();
            if (command.StartsWith("CodePage:", StringComparison.OrdinalIgnoreCase))
                command = command.Substring(9);
            try
            {
                if (command.Equals("RAW"))
                    return -1;
                else if (command.Equals("GUESS"))
                    return -2;
                else if (command.Equals("DEFAULT"))
                    return 0;
                else if (char.IsDigit(command[0]))
                    return int.Parse(command, CultureInfo.InvariantCulture);
                else
                {
                    Encoding enc = Encoding.GetEncoding(command);
                    return enc.CodePage;
                }
            }
            catch (FormatException)
            {
                Console.Error.WriteLine(
                    "Invalid format \"{0}\", using machine default", option);
            }
            catch (ArgumentException)
            {
                Console.Error.WriteLine(
                    "Unknown code page \"{0}\", using machine default", option);
            }
            return 0;
        }
    }
#region guesser
#if (!BYTEMODE)
    // ==============================================================
    // ============          Encoding Guesser           =============
    // ==============================================================

    /// <summary>
    /// This class provides a simple finite state automaton that
    /// scans the file looking for (1) valid UTF-8 byte patterns,
    /// (2) bytes >= 0x80 which are not part of a UTF-8 sequence.
    /// The method then guesses whether it is UTF-8 or maybe some 
    /// local machine default encoding.  This works well for the
    /// various Latin encodings.
    /// </summary>
    internal class Guesser
    {
        ScanBuff buffer;

        public int GuessCodePage() { return Scan(); }

        const int maxAccept = 10;
        const int initial = 0;
        const int eofNum = 0;
        const int goStart = -1;
        const int INITIAL = 0;
        const int EndToken = 0;

        #region user code
        /* 
         *  Reads the bytes of a file to determine if it is 
         *  UTF-8 or a single-byte code page file.
         */
        public long utfX;
        public long uppr;
        #endregion user code

        int state;
        int currentStart = startState[0];
        int code;

        #region ScannerTables
        static int[] startState = new int[] { 11, 0 };

        #region CharacterMap
        static sbyte[] map = new sbyte[256] {
/*     '\0' */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
/*   '\x10' */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
/*   '\x20' */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
/*      '0' */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
/*      '@' */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
/*      'P' */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
/*      '`' */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
/*      'p' */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
/*   '\x80' */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 
/*   '\x90' */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 
/*   '\xA0' */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 
/*   '\xB0' */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 
/*   '\xC0' */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
/*   '\xD0' */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
/*   '\xE0' */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 
/*   '\xF0' */ 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 };
        #endregion

        static sbyte[][] nextState = new sbyte[][] {
            new sbyte[] {0, 0, 0, 0, 0, 0},
            new sbyte[] {-1, -1, 10, -1, -1, -1},
            new sbyte[] {-1, -1, -1, -1, -1, -1},
            new sbyte[] {-1, -1, 8, -1, -1, -1},
            new sbyte[] {-1, -1, 5, -1, -1, -1},
            new sbyte[] {-1, -1, 6, -1, -1, -1},
            new sbyte[] {-1, -1, 7, -1, -1, -1},
            null,
            new sbyte[] {-1, -1, 9, -1, -1, -1},
            null,
            null,
            new sbyte[] {-1, 1, 2, 3, 4, 2}
        };


        [SuppressMessage("Microsoft.Performance", "CA1810:InitializeReferenceTypeStaticFieldsInline")]
        // Reason for suppression: cannot have self-reference in array initializer.
        static Guesser()
        {
            nextState[7] = nextState[2];
            nextState[9] = nextState[2];
            nextState[10] = nextState[2];
        }

        int NextState()
        {
            if (code == ScanBuff.EndOfFile)
                return eofNum;
            else
                return nextState[state][map[code]];
        }
        #endregion

        public Guesser(System.IO.Stream file) { SetSource(file); }

        public void SetSource(System.IO.Stream source)
        {
            this.buffer = new BuildBuffer(source);
            code = buffer.Read();
        }

        int Scan()
        {
            for (; ; )
            {
                int next;
                state = currentStart;
                while ((next = NextState()) == goStart)
                    code = buffer.Read();

                state = next;
                code = buffer.Read();

                while ((next = NextState()) > eofNum)
                {
                    state = next;
                    code = buffer.Read();
                }
                if (state <= maxAccept)
                {
                    #region ActionSwitch
#pragma warning disable 162
                    switch (state)
                    {
                        case eofNum:
                            switch (currentStart)
                            {
                                case 11:
                                    if (utfX == 0 && uppr == 0) return -1; /* raw ascii */
                                    else if (uppr * 10 > utfX) return 0;   /* default code page */
                                    else return 65001;                     /* UTF-8 encoding */
                                    break;
                            }
                            return EndToken;
                        case 1: // Recognized '{Upper128}',	Shortest string "\xC0"
                        case 2: // Recognized '{Upper128}',	Shortest string "\x80"
                        case 3: // Recognized '{Upper128}',	Shortest string "\xE0"
                        case 4: // Recognized '{Upper128}',	Shortest string "\xF0"
                            uppr++;
                            break;
                        case 5: // Recognized '{Utf8pfx4}{Utf8cont}',	Shortest string "\xF0\x80"
                            uppr += 2;
                            break;
                        case 6: // Recognized '{Utf8pfx4}{Utf8cont}{2}',	Shortest string "\xF0\x80\x80"
                            uppr += 3;
                            break;
                        case 7: // Recognized '{Utf8pfx4}{Utf8cont}{3}',	Shortest string "\xF0\x80\x80\x80"
                            utfX += 3;
                            break;
                        case 8: // Recognized '{Utf8pfx3}{Utf8cont}',	Shortest string "\xE0\x80"
                            uppr += 2;
                            break;
                        case 9: // Recognized '{Utf8pfx3}{Utf8cont}{2}',	Shortest string "\xE0\x80\x80"
                            utfX += 2;
                            break;
                        case 10: // Recognized '{Utf8pfx2}{Utf8cont}',	Shortest string "\xC0\x80"
                            utfX++;
                            break;
                        default:
                            break;
                    }
#pragma warning restore 162
                    #endregion
                }
            }
        }
    } // end class Guesser
    
#endif // !BYTEMODE
#endregion

// End of code copied from embedded resource

} // end namespace
