/* The following code was generated by JFlex 1.4.1 on 2/17/09 3:24 PM */

//based on http://jflex.de/manual.html

package test.jflex.metalexer;
import static test.jflex.metalexer.LayoutParser.Terminals.*;

import beaver.Symbol;
import beaver.Scanner;

/**
 * This class is a scanner generated by 
 * <a href="http://www.jflex.de/">JFlex</a> 1.4.1
 * on 2/17/09 3:24 PM from the specification file
 * <tt>test/backend-jflex/out/metalexer/layout/layout.flex</tt>
 */
public final class LayoutScanner extends Scanner {

  /** This character denotes the end of file */
  public static final int YYEOF = -1;

  /** initial size of the lookahead buffer */
  private static final int ZZ_BUFFERSIZE = 16384;

  /** lexical states */
  public static final int layout_rule_section_YYINITIAL_STATE = 9;
  public static final int base_YYINITIAL_STATE = 2;
  public static final int string_directive_YYINITIAL_STATE = 14;
  public static final int local_header_YYINITIAL_STATE = 10;
  public static final int decl_region_YYINITIAL_STATE = 4;
  public static final int EXTRA_RETURN = 1;
  public static final int inherited_header_YYINITIAL_STATE = 6;
  public static final int YYINITIAL = 0;
  public static final int layout_option_section_YYINITIAL_STATE = 8;
  public static final int string_YYINITIAL_STATE = 13;
  public static final int bracket_comment_YYINITIAL_STATE = 3;
  public static final int init_region_YYINITIAL_STATE = 7;
  public static final int metapattern_directive_YYINITIAL_STATE = 11;
  public static final int identifier_directive_YYINITIAL_STATE = 5;
  public static final int pair_directive_YYINITIAL_STATE = 12;

  /** 
   * Translates characters to character classes
   */
  private static final String ZZ_CMAP_PACKED = 
    "\11\0\1\7\1\6\1\0\1\7\1\5\22\0\1\7\1\30\1\17"+
    "\1\0\1\30\1\3\2\0\1\61\1\62\1\2\1\66\1\31\2\30"+
    "\1\1\4\26\4\27\2\11\2\0\1\50\1\0\1\54\1\67\1\0"+
    "\1\51\1\55\2\20\1\60\1\57\7\10\1\52\1\56\11\10\1\53"+
    "\1\10\1\63\1\21\1\64\1\65\1\12\1\0\1\36\1\46\1\42"+
    "\1\44\1\33\1\23\1\47\1\32\1\13\2\10\1\34\1\43\1\14"+
    "\1\40\1\35\1\10\1\22\1\41\1\15\1\25\1\10\1\45\1\24"+
    "\1\37\1\10\1\16\1\70\1\4\1\30\uff81\0";

  /** 
   * Translates characters to character classes
   */
  private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);

  /** 
   * Translates DFA states to action switch labels.
   */
  private static final int [] ZZ_ACTION = zzUnpackAction();

  private static final String ZZ_ACTION_PACKED_0 =
    "\17\0\1\1\1\2\3\3\2\4\2\5\2\6\1\7"+
    "\1\10\1\11\2\12\2\13\2\14\1\15\2\16\1\17"+
    "\3\20\2\21\1\22\2\23\2\24\1\25\1\24\2\26"+
    "\1\27\1\30\1\24\1\31\1\32\1\33\1\34\1\35"+
    "\1\36\1\37\1\40\3\41\2\42\1\43\1\44\1\45"+
    "\1\46\2\47\1\50\1\51\2\52\2\53\1\54\1\55"+
    "\1\56\1\57\1\60\1\0\1\61\1\62\1\63\1\64"+
    "\2\0\1\65\1\66\1\67\1\0\1\70\6\0\1\71"+
    "\1\72\12\0\1\73\1\74\1\75\4\0\1\76\1\77"+
    "\1\0\1\100\1\101\2\100\2\101\1\102\1\103\1\104"+
    "\25\0\1\105\3\0\1\106\1\0\1\101\21\0\1\107"+
    "\7\0\1\101\14\0\1\110\3\0\1\111\1\107\1\0"+
    "\1\112\3\0\1\113\1\114\1\115\1\101\1\0\1\116"+
    "\1\0\1\117\4\0\1\120\4\0\1\110\4\0\1\111"+
    "\1\0\1\112\1\0\1\121\1\0\1\122\1\123\1\0"+
    "\1\124\1\0\1\125\1\126\1\120\4\0\1\127\3\0"+
    "\1\121\1\0\1\130\1\122\2\0\1\124\2\0\1\125"+
    "\1\0\1\126\2\0\1\131\1\0\1\127\1\0\1\132"+
    "\1\133\1\0\1\130\2\0\1\134\1\0\1\131\1\0"+
    "\1\135\1\132\1\0\1\133\1\0\1\136\1\137\1\134"+
    "\1\0\1\140\1\135\1\0\1\136\1\0\1\137\1\0"+
    "\1\140\1\0";

  private static int [] zzUnpackAction() {
    int [] result = new int[302];
    int offset = 0;
    offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
    return result;
  }

  private static int zzUnpackAction(String packed, int offset, int [] result) {
    int i = 0;       /* index in packed string  */
    int j = offset;  /* index in unpacked array */
    int l = packed.length();
    while (i < l) {
      int count = packed.charAt(i++);
      int value = packed.charAt(i++);
      do result[j++] = value; while (--count > 0);
    }
    return j;
  }


  /** 
   * Translates a state to a row index in the transition table
   */
  private static final int [] ZZ_ROWMAP = zzUnpackRowMap();

  private static final String ZZ_ROWMAP_PACKED_0 =
    "\0\0\0\71\0\162\0\253\0\344\0\u011d\0\u0156\0\u018f"+
    "\0\u01c8\0\u0201\0\u023a\0\u0273\0\u02ac\0\u02e5\0\u031e\0\0"+
    "\0\0\0\0\0\u0357\0\u0390\0\0\0\u03c9\0\0\0\u0402"+
    "\0\u043b\0\0\0\0\0\u0474\0\0\0\0\0\u04ad\0\0"+
    "\0\u04e6\0\0\0\u051f\0\u0558\0\u0591\0\0\0\0\0\0"+
    "\0\u05ca\0\u0603\0\u063c\0\0\0\0\0\0\0\u0675\0\0"+
    "\0\u06ae\0\0\0\u06e7\0\u0720\0\0\0\0\0\u0759\0\u0792"+
    "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"+
    "\0\0\0\u07cb\0\u0804\0\u083d\0\0\0\0\0\u0876\0\0"+
    "\0\0\0\u08af\0\0\0\0\0\u08e8\0\0\0\u0921\0\u095a"+
    "\0\0\0\0\0\0\0\0\0\0\0\0\0\u0993\0\0"+
    "\0\u09cc\0\0\0\0\0\u0a05\0\u0a3e\0\u0a77\0\0\0\0"+
    "\0\u0ab0\0\0\0\u0ae9\0\u0b22\0\u0b5b\0\u0b94\0\u0bcd\0\u0c06"+
    "\0\u0c3f\0\0\0\u0c78\0\u0cb1\0\u0cea\0\u0d23\0\u0d5c\0\u0d95"+
    "\0\u0dce\0\u0e07\0\u0e40\0\u0e79\0\0\0\u0eb2\0\0\0\u0eeb"+
    "\0\u0f24\0\u0f5d\0\u0f96\0\u0fcf\0\0\0\u1008\0\0\0\0"+
    "\0\u1041\0\u107a\0\u10b3\0\u10ec\0\u1125\0\0\0\0\0\u115e"+
    "\0\u1197\0\u11d0\0\u1209\0\u1242\0\u127b\0\u12b4\0\u12ed\0\u1326"+
    "\0\u135f\0\u1398\0\u13d1\0\u140a\0\u1443\0\u147c\0\u14b5\0\u14ee"+
    "\0\u1527\0\u1560\0\u1599\0\u15d2\0\0\0\u160b\0\u1644\0\u167d"+
    "\0\0\0\u16b6\0\u16ef\0\u1728\0\u1761\0\u179a\0\u17d3\0\u180c"+
    "\0\u1845\0\u187e\0\u18b7\0\u18f0\0\u1929\0\u1962\0\u199b\0\u19d4"+
    "\0\u1a0d\0\u1a46\0\u1a7f\0\u1ab8\0\u1af1\0\u1b2a\0\u1b63\0\u1b9c"+
    "\0\u1bd5\0\u1c0e\0\u1c47\0\u1c80\0\u1cb9\0\u1cf2\0\u1d2b\0\u1d64"+
    "\0\u1d9d\0\u1dd6\0\u1e0f\0\u1e48\0\u1e81\0\u1eba\0\u1ef3\0\u1f2c"+
    "\0\u1f65\0\u1f9e\0\u1fd7\0\u2010\0\u2049\0\u2082\0\u20bb\0\u20bb"+
    "\0\u20f4\0\u212d\0\u2166\0\u219f\0\0\0\0\0\0\0\u16b6"+
    "\0\u21d8\0\0\0\u2211\0\0\0\u224a\0\u2283\0\u22bc\0\u22f5"+
    "\0\u232e\0\u2367\0\u23a0\0\u23d9\0\u2412\0\u244b\0\u244b\0\u2484"+
    "\0\u24bd\0\u24f6\0\u252f\0\u252f\0\u2568\0\u2568\0\u25a1\0\u25da"+
    "\0\u2613\0\0\0\u264c\0\u2685\0\u26be\0\u26f7\0\u2730\0\u2769"+
    "\0\u2769\0\u27a2\0\u27db\0\u2814\0\u284d\0\u2886\0\u28bf\0\u28f8"+
    "\0\u2931\0\u2931\0\u296a\0\u29a3\0\u29a3\0\u29dc\0\u2a15\0\u2a15"+
    "\0\u2a4e\0\u2a87\0\u2a87\0\u2ac0\0\u2ac0\0\u2af9\0\u2b32\0\u2b6b"+
    "\0\u2ba4\0\u2ba4\0\u2bdd\0\u2c16\0\u2c4f\0\u2c88\0\u2c88\0\u2cc1"+
    "\0\u2cfa\0\u2d33\0\u2d6c\0\u2d6c\0\u2da5\0\u2dde\0\u2dde\0\u2e17"+
    "\0\u2e17\0\u2e50\0\u2e89\0\u2ec2\0\u2ec2\0\u2efb\0\u2f34\0\u2f34"+
    "\0\u2f6d\0\u2f6d\0\u2fa6\0\u2fa6\0\u2fdf\0\u2fdf";

  private static int [] zzUnpackRowMap() {
    int [] result = new int[302];
    int offset = 0;
    offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
    return result;
  }

  private static int zzUnpackRowMap(String packed, int offset, int [] result) {
    int i = 0;  /* index in packed string  */
    int j = offset;  /* index in unpacked array */
    int l = packed.length();
    while (i < l) {
      int high = packed.charAt(i++) << 16;
      result[j++] = high | packed.charAt(i++);
    }
    return j;
  }

  /** 
   * The transition table of the DFA
   */
  private static final int [] ZZ_TRANS = zzUnpackTrans();

  private static final String ZZ_TRANS_PACKED_0 =
    "\71\0\71\20\71\21\1\22\1\23\1\24\66\22\3\25"+
    "\1\26\65\25\1\27\1\30\3\27\1\31\1\32\1\33"+
    "\1\34\2\27\3\34\2\27\1\34\1\27\4\34\3\27"+
    "\1\35\16\34\1\27\3\34\1\27\4\34\10\27\3\36"+
    "\1\37\65\36\3\40\1\41\65\40\1\42\1\43\1\42"+
    "\1\44\1\42\1\45\1\46\1\47\61\42\1\50\1\51"+
    "\1\50\1\52\1\50\1\53\1\54\1\55\61\50\3\56"+
    "\1\57\65\56\1\60\1\61\1\62\1\63\1\60\1\64"+
    "\1\65\1\66\1\67\2\60\3\67\2\60\1\67\1\60"+
    "\4\67\4\60\16\67\1\70\3\67\1\60\4\67\1\71"+
    "\1\72\1\73\1\74\1\75\1\76\1\77\1\100\1\101"+
    "\1\102\1\101\1\103\1\101\1\104\1\105\1\106\1\107"+
    "\2\101\3\107\2\101\1\107\1\101\4\107\3\101\1\110"+
    "\16\107\1\101\3\107\1\101\4\107\10\101\5\111\1\112"+
    "\1\113\10\111\1\114\1\111\1\115\47\111\1\116\1\117"+
    "\3\116\1\120\1\121\1\122\7\116\1\123\11\116\1\124"+
    "\37\116\2\0\1\125\67\0\1\126\72\0\1\127\1\130"+
    "\65\0\1\131\1\132\74\0\1\32\72\0\6\34\2\0"+
    "\1\34\1\0\6\34\2\0\16\34\1\0\3\34\1\0"+
    "\4\34\13\0\1\133\70\0\1\134\7\0\1\135\56\0"+
    "\1\136\1\137\71\0\1\140\7\0\1\141\2\0\1\142"+
    "\13\0\1\143\1\0\1\144\3\0\1\145\1\146\1\147"+
    "\1\0\1\150\32\0\1\46\63\0\1\151\1\152\71\0"+
    "\1\153\10\0\1\154\5\0\1\155\2\0\1\156\4\0"+
    "\1\157\1\160\1\0\1\161\3\0\1\162\2\0\1\163"+
    "\2\0\1\164\27\0\1\54\65\0\1\165\66\0\1\166"+
    "\1\167\76\0\1\170\2\0\3\170\2\0\1\170\1\0"+
    "\4\170\4\0\16\170\1\0\3\170\1\0\4\170\16\0"+
    "\1\65\72\0\6\67\2\0\1\67\1\0\6\67\2\0"+
    "\16\67\1\0\3\67\1\0\4\67\61\0\1\171\3\0"+
    "\1\172\2\0\1\173\11\0\1\174\1\175\76\0\1\176"+
    "\2\0\3\176\2\0\1\176\1\0\4\176\4\0\16\176"+
    "\1\0\3\176\1\0\4\176\16\0\1\105\72\0\6\107"+
    "\2\0\1\107\1\0\6\107\2\0\16\107\1\0\3\107"+
    "\1\0\4\107\16\0\1\113\62\0\1\177\2\200\1\177"+
    "\1\200\2\0\5\177\4\200\1\177\3\200\1\201\1\202"+
    "\1\203\1\204\1\200\15\177\1\200\1\177\1\200\3\177"+
    "\1\200\4\177\10\200\1\0\1\205\1\206\74\0\1\121"+
    "\66\0\1\207\64\0\5\131\2\0\62\131\13\0\1\210"+
    "\71\0\1\211\54\0\5\136\2\0\62\136\14\0\1\212"+
    "\107\0\1\213\70\0\1\214\2\0\1\215\67\0\1\216"+
    "\50\0\1\217\113\0\1\220\63\0\1\221\35\0\5\151"+
    "\2\0\62\151\13\0\1\222\17\0\1\223\73\0\1\224"+
    "\65\0\1\225\51\0\1\226\114\0\1\227\44\0\1\230"+
    "\112\0\1\231\47\0\1\232\106\0\1\233\62\0\1\234"+
    "\43\0\5\166\2\0\62\166\3\0\1\235\4\0\6\170"+
    "\2\0\1\170\1\0\6\170\2\0\16\170\1\0\3\170"+
    "\1\0\4\170\62\0\1\236\74\0\1\237\70\0\1\240"+
    "\12\0\5\174\2\0\62\174\3\0\1\241\4\0\6\176"+
    "\2\0\1\176\1\0\6\176\2\0\16\176\1\0\3\176"+
    "\1\0\4\176\21\0\1\242\6\0\1\242\2\0\1\242"+
    "\2\0\2\242\3\0\1\242\2\0\1\242\3\0\1\242"+
    "\1\0\1\242\1\0\1\242\2\0\1\242\3\0\1\242"+
    "\1\0\2\242\21\0\1\243\6\0\1\243\2\0\1\243"+
    "\2\0\2\243\3\0\1\243\2\0\1\243\3\0\1\243"+
    "\1\0\1\243\1\0\1\243\2\0\1\243\3\0\1\243"+
    "\1\0\2\243\36\0\2\204\67\0\2\200\41\0\5\205"+
    "\2\0\62\205\14\0\1\244\67\0\1\245\70\0\1\246"+
    "\111\0\1\247\60\0\1\250\103\0\1\251\46\0\1\252"+
    "\111\0\1\253\75\0\1\254\67\0\1\255\42\0\1\256"+
    "\117\0\1\257\70\0\1\260\62\0\1\261\66\0\1\262"+
    "\4\0\1\263\71\0\1\264\73\0\1\265\37\0\1\266"+
    "\113\0\1\267\66\0\1\270\67\0\1\271\110\0\1\272"+
    "\74\0\1\273\70\0\1\274\22\0\1\200\6\0\1\200"+
    "\2\0\1\200\2\0\2\200\3\0\1\200\2\0\1\200"+
    "\3\0\1\200\1\0\1\200\1\0\1\200\2\0\1\200"+
    "\3\0\1\200\1\0\2\200\21\0\1\275\6\0\1\275"+
    "\2\0\1\275\2\0\2\275\3\0\1\275\2\0\1\275"+
    "\3\0\1\275\1\0\1\275\1\0\1\275\2\0\1\275"+
    "\3\0\1\275\1\0\2\275\23\0\1\276\72\0\1\277"+
    "\70\0\1\300\110\0\1\301\50\0\1\302\113\0\1\303"+
    "\43\0\1\304\77\0\1\305\103\0\1\306\67\0\1\307"+
    "\66\0\1\310\104\0\1\311\55\0\1\312\71\0\1\313"+
    "\77\0\1\314\62\0\1\315\50\0\1\316\53\0\10\317"+
    "\6\320\2\317\1\320\1\317\6\320\2\317\16\320\1\317"+
    "\3\320\1\317\4\320\10\317\22\0\1\321\70\0\1\322"+
    "\101\0\1\323\76\0\1\324\103\0\1\325\70\0\1\326"+
    "\70\0\1\327\25\0\1\330\6\0\1\330\2\0\1\330"+
    "\2\0\2\330\3\0\1\330\2\0\1\330\3\0\1\330"+
    "\1\0\1\330\1\0\1\330\2\0\1\330\3\0\1\330"+
    "\1\0\2\330\25\0\1\331\57\0\1\332\101\0\1\333"+
    "\1\334\105\0\1\335\67\0\1\336\63\0\1\337\103\0"+
    "\1\340\45\0\1\341\113\0\1\342\66\0\1\343\65\0"+
    "\1\344\70\0\1\345\35\0\10\346\6\347\2\346\1\347"+
    "\1\346\6\347\2\346\16\347\1\346\3\347\1\346\4\347"+
    "\10\346\36\0\1\350\100\0\1\351\37\0\1\352\53\0"+
    "\10\353\6\354\2\353\1\354\1\353\6\354\2\353\16\354"+
    "\1\353\3\354\1\353\4\354\10\353\71\317\10\355\6\356"+
    "\2\355\1\356\1\355\6\356\2\355\16\356\1\355\3\356"+
    "\1\355\4\356\10\355\15\0\1\357\70\0\1\360\70\0"+
    "\1\361\57\0\1\362\116\0\1\363\60\0\1\364\70\0"+
    "\1\365\63\0\1\366\67\0\1\367\54\0\10\370\6\371"+
    "\2\370\1\371\1\370\6\371\2\370\16\371\1\370\3\371"+
    "\1\370\4\371\10\370\14\0\1\372\76\0\1\373\70\0"+
    "\1\374\112\0\1\375\24\0\71\346\42\0\1\376\61\0"+
    "\1\377\50\0\1\u0100\55\0\71\353\71\355\10\u0101\6\u0102"+
    "\2\u0101\1\u0102\1\u0101\6\u0102\2\u0101\16\u0102\1\u0101\3\u0102"+
    "\1\u0101\4\u0102\10\u0101\33\0\1\u0103\35\0\10\u0104\6\u0105"+
    "\2\u0104\1\u0105\1\u0104\6\u0105\2\u0104\16\u0105\1\u0104\3\u0105"+
    "\1\u0104\4\u0105\10\u0104\22\0\1\u0106\46\0\10\u0107\6\u0108"+
    "\2\u0107\1\u0108\1\u0107\6\u0108\2\u0107\16\u0108\1\u0107\3\u0108"+
    "\1\u0107\4\u0108\10\u0107\40\0\1\u0109\30\0\10\u010a\6\u010b"+
    "\2\u010a\1\u010b\1\u010a\6\u010b\2\u010a\16\u010b\1\u010a\3\u010b"+
    "\1\u010a\4\u010b\10\u010a\10\u010c\6\u010d\2\u010c\1\u010d\1\u010c"+
    "\6\u010d\2\u010c\16\u010d\1\u010c\3\u010d\1\u010c\4\u010d\10\u010c"+
    "\71\370\33\0\1\u010e\70\0\1\u010f\50\0\1\u0110\55\0"+
    "\10\u0111\6\u0112\2\u0111\1\u0112\1\u0111\6\u0112\2\u0111\16\u0112"+
    "\1\u0111\3\u0112\1\u0111\4\u0112\10\u0111\33\0\1\u0113\101\0"+
    "\1\u0114\64\0\1\u0115\30\0\71\u0101\10\u0116\6\u0117\2\u0116"+
    "\1\u0117\1\u0116\6\u0117\2\u0116\16\u0117\1\u0116\3\u0117\1\u0116"+
    "\4\u0117\10\u0116\71\u0104\40\0\1\u0118\30\0\71\u0107\45\0"+
    "\1\u0119\23\0\71\u010a\71\u010c\14\0\1\u011a\54\0\10\u011b"+
    "\6\u011c\2\u011b\1\u011c\1\u011b\6\u011c\2\u011b\16\u011c\1\u011b"+
    "\3\u011c\1\u011b\4\u011c\10\u011b\15\0\1\u011d\53\0\71\u0111"+
    "\10\u011e\6\u011f\2\u011e\1\u011f\1\u011e\6\u011f\2\u011e\16\u011f"+
    "\1\u011e\3\u011f\1\u011e\4\u011f\10\u011e\10\u0120\6\u0121\2\u0120"+
    "\1\u0121\1\u0120\6\u0121\2\u0120\16\u0121\1\u0120\3\u0121\1\u0120"+
    "\4\u0121\10\u0120\14\0\1\u0122\54\0\71\u0116\45\0\1\u0123"+
    "\23\0\10\u0124\6\u0125\2\u0124\1\u0125\1\u0124\6\u0125\2\u0124"+
    "\16\u0125\1\u0124\3\u0125\1\u0124\4\u0125\10\u0124\15\0\1\u0126"+
    "\53\0\71\u011b\10\u0127\6\u0128\2\u0127\1\u0128\1\u0127\6\u0128"+
    "\2\u0127\16\u0128\1\u0127\3\u0128\1\u0127\4\u0128\10\u0127\71\u011e"+
    "\71\u0120\10\u0129\6\u012a\2\u0129\1\u012a\1\u0129\6\u012a\2\u0129"+
    "\16\u012a\1\u0129\3\u012a\1\u0129\4\u012a\10\u0129\10\u012b\6\u012c"+
    "\2\u012b\1\u012c\1\u012b\6\u012c\2\u012b\16\u012c\1\u012b\3\u012c"+
    "\1\u012b\4\u012c\10\u012b\71\u0124\10\u012d\6\u012e\2\u012d\1\u012e"+
    "\1\u012d\6\u012e\2\u012d\16\u012e\1\u012d\3\u012e\1\u012d\4\u012e"+
    "\10\u012d\71\u0127\71\u0129\71\u012b\71\u012d";

  private static int [] zzUnpackTrans() {
    int [] result = new int[12312];
    int offset = 0;
    offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
    return result;
  }

  private static int zzUnpackTrans(String packed, int offset, int [] result) {
    int i = 0;       /* index in packed string  */
    int j = offset;  /* index in unpacked array */
    int l = packed.length();
    while (i < l) {
      int count = packed.charAt(i++);
      int value = packed.charAt(i++);
      value--;
      do result[j++] = value; while (--count > 0);
    }
    return j;
  }


  /* error codes */
  private static final int ZZ_UNKNOWN_ERROR = 0;
  private static final int ZZ_NO_MATCH = 1;
  private static final int ZZ_PUSHBACK_2BIG = 2;

  /* error messages for the codes above */
  private static final String ZZ_ERROR_MSG[] = {
    "Unkown internal scanner error",
    "Error: could not match input",
    "Error: pushback value was too large"
  };

  /**
   * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
   */
  private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();

  private static final String ZZ_ATTRIBUTE_PACKED_0 =
    "\1\10\16\0\3\11\2\1\1\11\1\1\1\11\2\1"+
    "\2\11\1\1\2\11\1\1\1\11\1\1\1\11\3\1"+
    "\3\11\3\1\3\11\1\1\1\11\1\1\1\11\2\1"+
    "\2\11\2\1\11\11\3\1\2\11\1\1\2\11\1\1"+
    "\2\11\1\1\1\11\2\1\6\11\1\0\1\11\1\1"+
    "\2\11\2\0\1\1\2\11\1\0\1\11\6\0\1\1"+
    "\1\11\12\0\1\11\1\1\1\11\4\0\1\1\1\11"+
    "\1\0\2\11\5\1\2\11\25\0\1\11\3\0\1\11"+
    "\1\0\1\1\21\0\1\7\7\0\1\1\14\0\1\7"+
    "\3\0\1\7\1\5\1\0\1\7\3\0\3\11\1\1"+
    "\1\0\1\11\1\0\1\11\4\0\1\7\4\0\1\5"+
    "\4\0\1\5\1\0\1\5\1\0\1\7\1\0\1\7"+
    "\1\11\1\0\1\7\1\0\2\7\1\5\4\0\1\7"+
    "\3\0\1\5\1\0\1\7\1\5\2\0\1\5\2\0"+
    "\1\5\1\0\1\5\2\0\1\7\1\0\1\5\1\0"+
    "\2\7\1\0\1\5\2\0\1\7\1\0\1\5\1\0"+
    "\1\7\1\5\1\0\1\5\1\0\2\7\1\5\1\0"+
    "\1\7\1\5\1\0\1\5\1\0\1\5\1\0\1\5"+
    "\1\0";

  private static int [] zzUnpackAttribute() {
    int [] result = new int[302];
    int offset = 0;
    offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
    return result;
  }

  private static int zzUnpackAttribute(String packed, int offset, int [] result) {
    int i = 0;       /* index in packed string  */
    int j = offset;  /* index in unpacked array */
    int l = packed.length();
    while (i < l) {
      int count = packed.charAt(i++);
      int value = packed.charAt(i++);
      do result[j++] = value; while (--count > 0);
    }
    return j;
  }

  /** the input device */
  private java.io.Reader zzReader;

  /** the current state of the DFA */
  private int zzState;

  /** the current lexical state */
  private int zzLexicalState = YYINITIAL;

  /** this buffer contains the current text to be matched and is
      the source of the yytext() string */
  private char zzBuffer[] = new char[ZZ_BUFFERSIZE];

  /** the textposition at the last accepting state */
  private int zzMarkedPos;

  /** the textposition at the last state to be included in yytext */
  private int zzPushbackPos;

  /** the current text position in the buffer */
  private int zzCurrentPos;

  /** startRead marks the beginning of the yytext() string in the buffer */
  private int zzStartRead;

  /** endRead marks the last character in the buffer, that has been read
      from input */
  private int zzEndRead;

  /** number of newlines encountered up to the start of the matched text */
  private int yyline;

  /** the number of characters up to the start of the matched text */
  private int yychar;

  /**
   * the number of characters from the last newline up to the start of the 
   * matched text
   */
  private int yycolumn;

  /** 
   * zzAtBOL == true <=> the scanner is currently at the beginning of a line
   */
  private boolean zzAtBOL = true;

  /** zzAtEOF == true <=> the scanner is at the EOF */
  private boolean zzAtEOF;

  /* user code: */
    private final StateClass_layout state_layout = new StateClass_layout();
    private class StateClass_layout {
        private StateClass_layout() {
            metaLexerThread.start();
            
            //from test/backend-jflex/in/metalexer/layout.mll [101, 1]
            embeddingRecordArray[/*local_header_section*/ 0] = new EmbeddingRecord(inst_local_header, PairFilter.EMPTY);
            //from test/backend-jflex/in/metalexer/layout.mll [110, 1]
            embeddingRecordArray[/*inherited_header_section*/ 1] = new EmbeddingRecord(inst_inherited_header, PairFilter.EMPTY);
            //from test/backend-jflex/in/metalexer/layout.mll [119, 1]
            embeddingRecordArray[/*option_section*/ 2] = new EmbeddingRecord(inst_layout_option_section, PairFilter.EMPTY);
            //from test/backend-jflex/in/metalexer/layout.mll [126, 1]
            embeddingRecordArray[/*option_decl*/ 3] = new EmbeddingRecord(inst_decl_region, PairFilter.EMPTY);
            //from test/backend-jflex/in/metalexer/layout.mll [133, 1]
            embeddingRecordArray[/*option_init*/ 4] = new EmbeddingRecord(inst_init_region, PairFilter.EMPTY);
            //from test/backend-jflex/in/metalexer/layout.mll [140, 1]
            embeddingRecordArray[/*option_string_directive*/ 5] = new EmbeddingRecord(inst_string_directive, PairFilter.EMPTY);
            //from test/backend-jflex/in/metalexer/layout.mll [149, 1]
            embeddingRecordArray[/*rule_section*/ 6] = new EmbeddingRecord(inst_layout_rule_section, PairFilter.EMPTY);
            //from test/backend-jflex/in/metalexer/layout.mll [156, 1]
            embeddingRecordArray[/*metapattern_directive*/ 7] = new EmbeddingRecord(inst_metapattern_directive, PairFilter.EMPTY);
            //from test/backend-jflex/in/metalexer/layout.mll [163, 1]
            embeddingRecordArray[/*pair_directive*/ 8] = new EmbeddingRecord(inst_pair_directive, PairFilter.EMPTY);
            //from test/backend-jflex/in/metalexer/layout.mll [172, 1]
            embeddingRecordArray[/*comments*/ 9] = new EmbeddingRecord(inst_bracket_comment, PairFilter.EMPTY);
            //from test/backend-jflex/in/metalexer/layout.mll [181, 1]
            embeddingRecordArray[/*identifier_directive*/ 10] = new EmbeddingRecord(inst_identifier_directive, PairFilter.EMPTY);
            //from test/backend-jflex/in/metalexer/layout.mll [190, 1]
            embeddingRecordArray[/*string*/ 11] = new EmbeddingRecord(inst_string, PairFilter.EMPTY);
            
            //from test/backend-jflex/in/metalexer/layout.mll [95, 8]
            yybegin(base_YYINITIAL_STATE);
            
            embeddingStack.add(new EmbeddingRecord(inst_base, PairFilter.EMPTY));
            
            //Transition through states reachable by pure BOF patterns
            //NB: append actions will not be performed
            startEmbedding(/*local_header_section*/ 0); 
            
            restartAppendBuf();
        }
        
        private final EmbeddingRecord[] embeddingRecordArray = new EmbeddingRecord[12];
        private final CompClass_base inst_base = new CompClass_base();
        private final CompClass_bracket_comment inst_bracket_comment = new CompClass_bracket_comment();
        private final CompClass_decl_region inst_decl_region = new CompClass_decl_region();
        private final CompClass_identifier_directive inst_identifier_directive = new CompClass_identifier_directive();
        private final CompClass_inherited_header inst_inherited_header = new CompClass_inherited_header();
        private final CompClass_init_region inst_init_region = new CompClass_init_region();
        private final CompClass_layout_option_section inst_layout_option_section = new CompClass_layout_option_section();
        private final CompClass_layout_rule_section inst_layout_rule_section = new CompClass_layout_rule_section();
        private final CompClass_local_header inst_local_header = new CompClass_local_header();
        private final CompClass_metapattern_directive inst_metapattern_directive = new CompClass_metapattern_directive();
        private final CompClass_pair_directive inst_pair_directive = new CompClass_pair_directive();
        private final CompClass_string inst_string = new CompClass_string();
        private final CompClass_string_directive inst_string_directive = new CompClass_string_directive();
        private java.util.Stack<EmbeddingRecord> embeddingStack = new java.util.Stack<EmbeddingRecord>();
        
        private void startEmbedding(int newEmbeddingNum) {
            EmbeddingRecord newEmbedding = embeddingRecordArray[newEmbeddingNum];
            newEmbedding.getFilter().reset();
            embeddingStack.push(newEmbedding);
            yybegin(newEmbedding.getComp().getStartState());
        }
        private void endEmbedding() {
            embeddingStack.pop();
            EmbeddingRecord newEmbedding = embeddingStack.peek();
            yybegin(newEmbedding.getComp().getStartState());
        }
        private ComponentInnerClass getCurrComp() {
            return embeddingStack.peek().getComp();
        }
        private PairFilter getCurrFilter() {
            return embeddingStack.peek().getFilter();
        }
        
        private int startLine = -1;
        private int startCol = -1;
        private StringBuffer appendBuf = null;
        
        private void restartAppendBuf() {
            startLine = yyline + 1;
            startCol = yycolumn + 1;
            appendBuf = new StringBuffer();
        }
        private int getStartLine() {
            return startLine;
        }
        private int getStartColumn() {
            return startCol;
        }
        private String getAppendText() {
            return appendBuf.toString();
        }
        private <T> void append(T t) {
            appendBuf.append(t);
        }
        
        private Symbol extraReturn = null;
        private int prevState = -1;
        
        public Symbol getExtraReturn() {
            return extraReturn;
        }
        public int getPrevState() {
            return prevState;
        }
        private void returnExtraValue(Symbol value) {
            extraReturn = value;
            prevState = yystate();
            //System.err.println("yypushback(1)");
            yypushback(1); //to ensure that at least one char is available
            yybegin(EXTRA_RETURN);
        }
        
        private boolean stopped = false;
        
        public void stop() {
            stopped = true;
            pipe.writeFinal('\n');
            boolean joined = false;
            while(!joined) {
                try {
                    metaLexerThread.join();
                    joined = true;
                } catch(InterruptedException e) {}
            }
        }
        
        private final Pipe pipe = new Pipe();
        private final LayoutScanner_Meta metalexer = new LayoutScanner_Meta(pipe);
        private final Thread metaLexerThread = new Thread(new Runnable() {
            public void run() {
                try {
                    metalexer.start();
                } catch(java.io.IOException e) {
                    //unrecoverable
                    e.printStackTrace();
                }
            }}, "MetaLexerThread");
        
        private Integer sendMTok(char mtok) {
            if(stopped) {
                throw new IllegalStateException("No meta-tokens may be sent after stop() has been called.");
            }
            //System.err.println("sendMTok(" + Integer.toHexString(mtok) + ")");
            pipe.write(mtok);
            return metalexer.checkForTransition();
        }
        
        public void processMTok(char mtok)  throws Scanner.Exception{
            if(!getCurrFilter().test(mtok)) {
                //System.err.println("Pair filter caught: " + Integer.toHexString(mtok));
                return; //don't send character if it gets filtered out
            }
            Maybe<? extends Symbol> maybeReturn = Maybe.Nothing();
            ComponentInnerClass currComp = getCurrComp();
            boolean appendActionPerformed = false;
            Integer nextEmbeddingNum = sendMTok(mtok);
            while(nextEmbeddingNum != null) {
                boolean endOfEmbedding = nextEmbeddingNum < 0;
                if(endOfEmbedding) {
                    endEmbedding();
                } else {
                    startEmbedding(nextEmbeddingNum);
                }
                ComponentInnerClass nextComp = getCurrComp();
                //NB: only one append action can meaningfully be performed since
                //  no input can be consumed while in this loop
                if(!appendActionPerformed && currComp.isAppend() && !nextComp.isAppend()) {
                    int endLine = yyline + 1;
                    int endCol = yycolumn; //+1 handled by increment below
                    
                    final String yytext = yytext();
                    final int yylength = yylength();
                    boolean prevWasNewline = false;
                    for(int i = 0; i < yylength; i++) {
                        if(prevWasNewline) {
                            endLine++;
                            endCol = 0;
                        }
                        switch(yytext.charAt(i)) {
                        case '\r':
                            if(i + 1 < yylength && yytext.charAt(i+1) == '\n') {
                                i++;
                            }
                            //NB: fall through
                        case '\n':
                            prevWasNewline = true;
                            break;
                        default:
                            prevWasNewline = false;
                            break;
                        }
                        endCol++;
                    }
                    maybeReturn = currComp.performAppendAction(getStartLine(), getStartColumn(), endLine, endCol, getAppendText());
                    appendActionPerformed = true;
                }
                
                if(currComp.isAppend() != nextComp.isAppend()) {
                    restartAppendBuf();
                }
                
                nextEmbeddingNum = null;
                if(endOfEmbedding) {
                    char regionChar = currComp.getCharValue();
                    if(getCurrFilter().test(regionChar)) {
                        nextEmbeddingNum = sendMTok(regionChar);
                    } else {
                        //System.err.println("Pair filter caught: " + Integer.toHexString(regionChar));
                    }
                }
            }
            if(maybeReturn.isJust()) {
                returnExtraValue(maybeReturn.fromJust());
            }
        }
    }
    private static abstract class ComponentInnerClass {
        public boolean isAppend() {
            return false;
        }
        public Maybe<? extends Symbol> performAppendAction(int startLine, int startCol, int endLine, int endCol, String text) throws Scanner.Exception {
            throw new UnsupportedOperationException(getClass().getName() + ".performAppendAction has not been implemented.");
        }
        public abstract int getStartState();
        public abstract char getCharValue();
    }
    //from test/backend-jflex/in/metalexer/base.mlc [1, 1]
    private class CompClass_base extends ComponentInnerClass {
        
        public CompClass_base() {
        }
        
        private static final int YYINITIAL = base_YYINITIAL_STATE; //from test/backend-jflex/in/metalexer/base.mlc [1, 1]
        
        
        public int getStartState() {
            //from test/backend-jflex/in/metalexer/base.mlc [1, 1]
            return YYINITIAL;
        }
        
        public char getCharValue() {
            return '\u0030';
        }
        
        public Maybe<? extends Symbol> base_action_1() throws Scanner.Exception {
            //System.err.println("state_layout.inst_base.base_action_1()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/base.mlc [9, 9]
                error("Unexpected character: " + yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> base_action_2() throws Scanner.Exception {
            //System.err.println("state_layout.inst_base.base_action_2()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/base.mlc [10, 9]
                return Maybe.Just(symbol(EOF));
            }
            return Maybe.Nothing();
        }
    }
    //from test/backend-jflex/in/metalexer/bracket_comment.mlc [1, 1]
    private class CompClass_bracket_comment extends ComponentInnerClass {
        
        public CompClass_bracket_comment() {
        }
        
        private static final int YYINITIAL = bracket_comment_YYINITIAL_STATE; //from test/backend-jflex/in/metalexer/bracket_comment.mlc [1, 1]
        
        
        public int getStartState() {
            //from test/backend-jflex/in/metalexer/bracket_comment.mlc [1, 1]
            return YYINITIAL;
        }
        
        public char getCharValue() {
            return '\u0032';
        }
        
        public Maybe<? extends Symbol> bracket_comment_action_1() throws Scanner.Exception {
            //System.err.println("state_layout.inst_bracket_comment.bracket_comment_action_1()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/bracket_comment.mlc [15, 22]
                //append(yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> bracket_comment_action_2() throws Scanner.Exception {
            //System.err.println("state_layout.inst_bracket_comment.bracket_comment_action_2()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/bracket_comment.mlc [16, 23]
                //append(yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> bracket_comment_action_3() throws Scanner.Exception {
            //System.err.println("state_layout.inst_bracket_comment.bracket_comment_action_3()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/bracket_comment.mlc [19, 9]
                //append(yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> bracket_comment_action_4() throws Scanner.Exception {
            //System.err.println("state_layout.inst_bracket_comment.bracket_comment_action_4()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/bracket_comment.mlc [20, 9]
                error("Unterminated bracket comment");
            }
            return Maybe.Nothing();
        }
    }
    //from test/backend-jflex/in/metalexer/decl_region.mlc [1, 1]
    private class CompClass_decl_region extends ComponentInnerClass {
        
        public CompClass_decl_region() {
        }
        
        private static final int YYINITIAL = decl_region_YYINITIAL_STATE; //from test/backend-jflex/in/metalexer/decl_region.mlc [1, 1]
        
        public boolean isAppend() {
            return true;
        }
        public Maybe<? extends Symbol> performAppendAction(int startLine, int startCol, int endLine, int endCol, String text) throws Scanner.Exception {
            if(Object.class != null) {
                //from null [6, 1]
                /*(int startLine, int startCol, int endLine, int endCol, String text)*/
    //TODO-AC: inserting delimiters is hackish
    return Maybe.Just(symbol(DECL_REGION, "%{" + text + "%}", startLine, startCol, endLine, endCol));
            }
            return Maybe.Nothing();
        }
        public <T> void append(T t) {
            state_layout.append(t);
        }
        
        public int getStartState() {
            //from test/backend-jflex/in/metalexer/decl_region.mlc [1, 1]
            return YYINITIAL;
        }
        
        public char getCharValue() {
            return '\u0035';
        }
        
        public Maybe<? extends Symbol> decl_region_action_1() throws Scanner.Exception {
            //System.err.println("state_layout.inst_decl_region.decl_region_action_1()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/decl_region.mlc [14, 20]
                append(yytext().substring(1));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> decl_region_action_2() throws Scanner.Exception {
            //System.err.println("state_layout.inst_decl_region.decl_region_action_2()");
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> decl_region_action_3() throws Scanner.Exception {
            //System.err.println("state_layout.inst_decl_region.decl_region_action_3()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/decl_region.mlc [18, 9]
                append(yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> decl_region_action_4() throws Scanner.Exception {
            //System.err.println("state_layout.inst_decl_region.decl_region_action_4()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/decl_region.mlc [19, 9]
                error("Unterminated declaration region");
            }
            return Maybe.Nothing();
        }
    }
    //from test/backend-jflex/in/metalexer/identifier_directive.mlc [1, 1]
    private class CompClass_identifier_directive extends ComponentInnerClass {
        
        public CompClass_identifier_directive() {
        }
        
        private static final int YYINITIAL = identifier_directive_YYINITIAL_STATE; //from test/backend-jflex/in/metalexer/identifier_directive.mlc [1, 1]
        
        
        public int getStartState() {
            //from test/backend-jflex/in/metalexer/identifier_directive.mlc [1, 1]
            return YYINITIAL;
        }
        
        public char getCharValue() {
            return '\u0037';
        }
        
        public Maybe<? extends Symbol> identifier_directive_action_1() throws Scanner.Exception {
            //System.err.println("state_layout.inst_identifier_directive.identifier_directive_action_1()");
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> identifier_directive_action_2() throws Scanner.Exception {
            //System.err.println("state_layout.inst_identifier_directive.identifier_directive_action_2()");
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> identifier_directive_action_3() throws Scanner.Exception {
            //System.err.println("state_layout.inst_identifier_directive.identifier_directive_action_3()");
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> identifier_directive_action_4() throws Scanner.Exception {
            //System.err.println("state_layout.inst_identifier_directive.identifier_directive_action_4()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/identifier_directive.mlc [20, 3]
                return Maybe.Just(symbol(COMMA));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> identifier_directive_action_5() throws Scanner.Exception {
            //System.err.println("state_layout.inst_identifier_directive.identifier_directive_action_5()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/abstract_comment.mlc [10, 11]
                /* ignore */
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> identifier_directive_action_6() throws Scanner.Exception {
            //System.err.println("state_layout.inst_identifier_directive.identifier_directive_action_6()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/identifier_directive.mlc [22, 14]
                return Maybe.Just(symbol(IDENTIFIER, yytext()));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> identifier_directive_action_7() throws Scanner.Exception {
            //System.err.println("state_layout.inst_identifier_directive.identifier_directive_action_7()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/identifier_directive.mlc [24, 9]
                error("Unexpected character in identifier list: " + yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> identifier_directive_action_8() throws Scanner.Exception {
            //System.err.println("state_layout.inst_identifier_directive.identifier_directive_action_8()");
            return Maybe.Nothing();
        }
    }
    //from test/backend-jflex/in/metalexer/inherited_header.mlc [1, 1]
    private class CompClass_inherited_header extends ComponentInnerClass {
        
        public CompClass_inherited_header() {
        }
        
        private static final int YYINITIAL = inherited_header_YYINITIAL_STATE; //from test/backend-jflex/in/metalexer/inherited_header.mlc [1, 1]
        
        public boolean isAppend() {
            return true;
        }
        public Maybe<? extends Symbol> performAppendAction(int startLine, int startCol, int endLine, int endCol, String text) throws Scanner.Exception {
            if(Object.class != null) {
                //from null [6, 1]
                /*(int startLine, int startCol, int endLine, int endCol, String text)*/
    if(text.startsWith("\r\n")) {
        text = text.substring(2);
    } else if(text.startsWith("\n") || text.startsWith("\r")) {
        text = text.substring(1);
    }
    return Maybe.Just(symbol(INHERITED_HEADER, text, startLine, startCol, endLine, endCol));
            }
            return Maybe.Nothing();
        }
        public <T> void append(T t) {
            state_layout.append(t);
        }
        
        public int getStartState() {
            //from test/backend-jflex/in/metalexer/inherited_header.mlc [1, 1]
            return YYINITIAL;
        }
        
        public char getCharValue() {
            return '\u0039';
        }
        
        public Maybe<? extends Symbol> inherited_header_action_1() throws Scanner.Exception {
            //System.err.println("state_layout.inst_inherited_header.inherited_header_action_1()");
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> inherited_header_action_2() throws Scanner.Exception {
            //System.err.println("state_layout.inst_inherited_header.inherited_header_action_2()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/inherited_header.mlc [21, 9]
                append(yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> inherited_header_action_3() throws Scanner.Exception {
            //System.err.println("state_layout.inst_inherited_header.inherited_header_action_3()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/inherited_header.mlc [22, 9]
                error("Unterminated inherited header section.");
            }
            return Maybe.Nothing();
        }
    }
    //from test/backend-jflex/in/metalexer/init_region.mlc [1, 1]
    private class CompClass_init_region extends ComponentInnerClass {
        
        public CompClass_init_region() {
        }
        
        private static final int YYINITIAL = init_region_YYINITIAL_STATE; //from test/backend-jflex/in/metalexer/init_region.mlc [1, 1]
        
        public boolean isAppend() {
            return true;
        }
        public Maybe<? extends Symbol> performAppendAction(int startLine, int startCol, int endLine, int endCol, String text) throws Scanner.Exception {
            if(Object.class != null) {
                //from null [6, 1]
                /*(int startLine, int startCol, int endLine, int endCol, String text)*/
    //TODO-AC: inserting delimiters is hackish
    return Maybe.Just(symbol(INIT_REGION, "%init{" + text + "%init}", startLine, startCol, endLine, endCol));
            }
            return Maybe.Nothing();
        }
        public <T> void append(T t) {
            state_layout.append(t);
        }
        
        public int getStartState() {
            //from test/backend-jflex/in/metalexer/init_region.mlc [1, 1]
            return YYINITIAL;
        }
        
        public char getCharValue() {
            return '\u0042';
        }
        
        public Maybe<? extends Symbol> init_region_action_1() throws Scanner.Exception {
            //System.err.println("state_layout.inst_init_region.init_region_action_1()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/init_region.mlc [14, 20]
                append(yytext().substring(1));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> init_region_action_2() throws Scanner.Exception {
            //System.err.println("state_layout.inst_init_region.init_region_action_2()");
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> init_region_action_3() throws Scanner.Exception {
            //System.err.println("state_layout.inst_init_region.init_region_action_3()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/init_region.mlc [18, 9]
                append(yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> init_region_action_4() throws Scanner.Exception {
            //System.err.println("state_layout.inst_init_region.init_region_action_4()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/init_region.mlc [19, 9]
                error("Unterminated init region");
            }
            return Maybe.Nothing();
        }
    }
    //from test/backend-jflex/in/metalexer/layout_option_section.mlc [1, 1]
    private class CompClass_layout_option_section extends ComponentInnerClass {
        
        public CompClass_layout_option_section() {
        }
        
        private static final int YYINITIAL = layout_option_section_YYINITIAL_STATE; //from test/backend-jflex/in/metalexer/layout_option_section.mlc [1, 1]
        
        
        public int getStartState() {
            //from test/backend-jflex/in/metalexer/layout_option_section.mlc [1, 1]
            return YYINITIAL;
        }
        
        public char getCharValue() {
            return '\u0044';
        }
        
        public Maybe<? extends Symbol> layout_option_section_action_1() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_option_section.layout_option_section_action_1()");
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_option_section_action_2() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_option_section.layout_option_section_action_2()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/layout_option_section.mlc [26, 18]
                /* ignore */
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_option_section_action_3() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_option_section.layout_option_section_action_3()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/layout_option_section.mlc [27, 19]
                /* ignore */
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_option_section_action_4() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_option_section.layout_option_section_action_4()");
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_option_section_action_5() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_option_section.layout_option_section_action_5()");
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_option_section_action_6() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_option_section.layout_option_section_action_6()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/layout_option_section.mlc [33, 34]
                return Maybe.Just(symbol(HELPER_DIRECTIVE));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_option_section_action_7() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_option_section.layout_option_section_action_7()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/layout_option_section.mlc [36, 34]
                return Maybe.Just(symbol(LAYOUT_DIRECTIVE));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_option_section_action_8() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_option_section.layout_option_section_action_8()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/layout_option_section.mlc [37, 33]
                return Maybe.Just(symbol(START_DIRECTIVE));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_option_section_action_9() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_option_section.layout_option_section_action_9()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/layout_option_section.mlc [38, 37]
                return Maybe.Just(symbol(COMPONENT_DIRECTIVE));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_option_section_action_10() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_option_section.layout_option_section_action_10()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/layout_option_section.mlc [41, 35]
                return Maybe.Just(symbol(DECLARE_DIRECTIVE));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_option_section_action_11() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_option_section.layout_option_section_action_11()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/layout_option_section.mlc [42, 34]
                return Maybe.Just(symbol(OPTION_DIRECTIVE));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_option_section_action_12() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_option_section.layout_option_section_action_12()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/layout_option_section.mlc [43, 37]
                return Maybe.Just(symbol(INITTHROW_DIRECTIVE));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_option_section_action_13() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_option_section.layout_option_section_action_13()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/layout_option_section.mlc [44, 36]
                return Maybe.Just(symbol(LEXTHROW_DIRECTIVE));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_option_section_action_14() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_option_section.layout_option_section_action_14()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/layout_option_section.mlc [47, 5]
                error("Invalid directive");
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_option_section_action_15() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_option_section.layout_option_section_action_15()");
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_option_section_action_16() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_option_section.layout_option_section_action_16()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/abstract_comment.mlc [10, 11]
                /* ignore */
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_option_section_action_17() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_option_section.layout_option_section_action_17()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/layout_option_section.mlc [56, 9]
                error("Unexpected character in option section: " + yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_option_section_action_18() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_option_section.layout_option_section_action_18()");
            return Maybe.Nothing();
        }
    }
    //from test/backend-jflex/in/metalexer/layout_rule_section.mlc [1, 1]
    private class CompClass_layout_rule_section extends ComponentInnerClass {
        
        public CompClass_layout_rule_section() {
        }
        
        private static final int YYINITIAL = layout_rule_section_YYINITIAL_STATE; //from test/backend-jflex/in/metalexer/layout_rule_section.mlc [1, 1]
        
        
        public int getStartState() {
            //from test/backend-jflex/in/metalexer/layout_rule_section.mlc [1, 1]
            return YYINITIAL;
        }
        
        public char getCharValue() {
            return '\u004a';
        }
        
        public Maybe<? extends Symbol> layout_rule_section_action_1() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_rule_section.layout_rule_section_action_1()");
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rule_section_action_2() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_rule_section.layout_rule_section_action_2()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/layout_rule_section.mlc [21, 18]
                /* ignore */
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rule_section_action_3() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_rule_section.layout_rule_section_action_3()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/layout_rule_section.mlc [22, 19]
                /* ignore */
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rule_section_action_4() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_rule_section.layout_rule_section_action_4()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/layout_rule_section.mlc [24, 34]
                return Maybe.Just(symbol(START_EMBED_GROUP));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rule_section_action_5() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_rule_section.layout_rule_section_action_5()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/layout_rule_section.mlc [26, 35]
                return Maybe.Just(symbol(INHERIT_UNEMBED));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rule_section_action_6() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_rule_section.layout_rule_section_action_6()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/layout_rule_section.mlc [27, 35]
                return Maybe.Just(symbol(INHERIT_REPLACE));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rule_section_action_7() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_rule_section.layout_rule_section_action_7()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/layout_rule_section.mlc [28, 36]
                return Maybe.Just(symbol(INHERIT_UNOPTION));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rule_section_action_8() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_rule_section.layout_rule_section_action_8()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/layout_rule_section.mlc [30, 32]
                return Maybe.Just(symbol(EMBEDDING_NAME));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rule_section_action_9() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_rule_section.layout_rule_section_action_9()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/layout_rule_section.mlc [31, 32]
                return Maybe.Just(symbol(EMBEDDING_HOST));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rule_section_action_10() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_rule_section.layout_rule_section_action_10()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/layout_rule_section.mlc [32, 33]
                return Maybe.Just(symbol(EMBEDDING_GUEST));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rule_section_action_11() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_rule_section.layout_rule_section_action_11()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/layout_rule_section.mlc [33, 32]
                return Maybe.Just(symbol(EMBEDDING_PAIR));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rule_section_action_12() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_rule_section.layout_rule_section_action_12()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/layout_rule_section.mlc [35, 33]
                return Maybe.Just(symbol(EMBEDDING_START));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rule_section_action_13() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_rule_section.layout_rule_section_action_13()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/layout_rule_section.mlc [36, 31]
                return Maybe.Just(symbol(EMBEDDING_END));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rule_section_action_14() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_rule_section.layout_rule_section_action_14()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/layout_rule_section.mlc [38, 36]
                return Maybe.Just(symbol(START_INHERIT_GROUP));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rule_section_action_15() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_rule_section.layout_rule_section_action_15()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/layout_rule_section.mlc [39, 34]
                return Maybe.Just(symbol(DELETION_DELETE));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rule_section_action_16() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_rule_section.layout_rule_section_action_16()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/abstract_comment.mlc [10, 11]
                /* ignore */
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rule_section_action_17() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_rule_section.layout_rule_section_action_17()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/layout_rule_section.mlc [44, 9]
                error("Unexpected character in rule section: " + yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rule_section_action_18() throws Scanner.Exception {
            //System.err.println("state_layout.inst_layout_rule_section.layout_rule_section_action_18()");
            return Maybe.Nothing();
        }
    }
    //from test/backend-jflex/in/metalexer/local_header.mlc [1, 1]
    private class CompClass_local_header extends ComponentInnerClass {
        
        public CompClass_local_header() {
        }
        
        private static final int YYINITIAL = local_header_YYINITIAL_STATE; //from test/backend-jflex/in/metalexer/local_header.mlc [1, 1]
        
        public boolean isAppend() {
            return true;
        }
        public Maybe<? extends Symbol> performAppendAction(int startLine, int startCol, int endLine, int endCol, String text) throws Scanner.Exception {
            if(Object.class != null) {
                //from null [6, 1]
                /*(int startLine, int startCol, int endLine, int endCol, String text)*/
    return Maybe.Just(symbol(LOCAL_HEADER, text, startLine, startCol, endLine, endCol));
            }
            return Maybe.Nothing();
        }
        public <T> void append(T t) {
            state_layout.append(t);
        }
        
        public int getStartState() {
            //from test/backend-jflex/in/metalexer/local_header.mlc [1, 1]
            return YYINITIAL;
        }
        
        public char getCharValue() {
            return '\u004e';
        }
        
        public Maybe<? extends Symbol> local_header_action_1() throws Scanner.Exception {
            //System.err.println("state_layout.inst_local_header.local_header_action_1()");
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> local_header_action_2() throws Scanner.Exception {
            //System.err.println("state_layout.inst_local_header.local_header_action_2()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/local_header.mlc [16, 9]
                append(yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> local_header_action_3() throws Scanner.Exception {
            //System.err.println("state_layout.inst_local_header.local_header_action_3()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/local_header.mlc [17, 9]
                error("Unterminated local header section.");
            }
            return Maybe.Nothing();
        }
    }
    //from test/backend-jflex/in/metalexer/metapattern_directive.mlc [1, 1]
    private class CompClass_metapattern_directive extends ComponentInnerClass {
        
        public CompClass_metapattern_directive() {
        }
        
        private static final int YYINITIAL = metapattern_directive_YYINITIAL_STATE; //from test/backend-jflex/in/metalexer/metapattern_directive.mlc [1, 1]
        
        
        public int getStartState() {
            //from test/backend-jflex/in/metalexer/metapattern_directive.mlc [1, 1]
            return YYINITIAL;
        }
        
        public char getCharValue() {
            return '\u0050';
        }
        
        public Maybe<? extends Symbol> metapattern_directive_action_1() throws Scanner.Exception {
            //System.err.println("state_layout.inst_metapattern_directive.metapattern_directive_action_1()");
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> metapattern_directive_action_2() throws Scanner.Exception {
            //System.err.println("state_layout.inst_metapattern_directive.metapattern_directive_action_2()");
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> metapattern_directive_action_3() throws Scanner.Exception {
            //System.err.println("state_layout.inst_metapattern_directive.metapattern_directive_action_3()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/metapattern_directive.mlc [19, 19]
                /* ignore */
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> metapattern_directive_action_4() throws Scanner.Exception {
            //System.err.println("state_layout.inst_metapattern_directive.metapattern_directive_action_4()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/metapattern_directive.mlc [21, 9]
                return Maybe.Just(symbol(MP_ANY));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> metapattern_directive_action_5() throws Scanner.Exception {
            //System.err.println("state_layout.inst_metapattern_directive.metapattern_directive_action_5()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/metapattern_directive.mlc [22, 9]
                return Maybe.Just(symbol(MP_BOF));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> metapattern_directive_action_6() throws Scanner.Exception {
            //System.err.println("state_layout.inst_metapattern_directive.metapattern_directive_action_6()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/metapattern_directive.mlc [23, 9]
                return Maybe.Just(symbol(MP_EOF));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> metapattern_directive_action_7() throws Scanner.Exception {
            //System.err.println("state_layout.inst_metapattern_directive.metapattern_directive_action_7()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/metapattern_directive.mlc [25, 5]
                return Maybe.Just(symbol(MP_LPAREN));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> metapattern_directive_action_8() throws Scanner.Exception {
            //System.err.println("state_layout.inst_metapattern_directive.metapattern_directive_action_8()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/metapattern_directive.mlc [26, 5]
                return Maybe.Just(symbol(MP_RPAREN));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> metapattern_directive_action_9() throws Scanner.Exception {
            //System.err.println("state_layout.inst_metapattern_directive.metapattern_directive_action_9()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/metapattern_directive.mlc [27, 5]
                return Maybe.Just(symbol(MP_LSQUARE));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> metapattern_directive_action_10() throws Scanner.Exception {
            //System.err.println("state_layout.inst_metapattern_directive.metapattern_directive_action_10()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/metapattern_directive.mlc [28, 5]
                return Maybe.Just(symbol(MP_RSQUARE));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> metapattern_directive_action_11() throws Scanner.Exception {
            //System.err.println("state_layout.inst_metapattern_directive.metapattern_directive_action_11()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/metapattern_directive.mlc [29, 5]
                return Maybe.Just(symbol(MP_CARET));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> metapattern_directive_action_12() throws Scanner.Exception {
            //System.err.println("state_layout.inst_metapattern_directive.metapattern_directive_action_12()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/metapattern_directive.mlc [30, 5]
                return Maybe.Just(symbol(MP_STAR));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> metapattern_directive_action_13() throws Scanner.Exception {
            //System.err.println("state_layout.inst_metapattern_directive.metapattern_directive_action_13()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/metapattern_directive.mlc [31, 5]
                return Maybe.Just(symbol(MP_PLUS));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> metapattern_directive_action_14() throws Scanner.Exception {
            //System.err.println("state_layout.inst_metapattern_directive.metapattern_directive_action_14()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/metapattern_directive.mlc [32, 5]
                return Maybe.Just(symbol(MP_OPT));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> metapattern_directive_action_15() throws Scanner.Exception {
            //System.err.println("state_layout.inst_metapattern_directive.metapattern_directive_action_15()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/metapattern_directive.mlc [33, 5]
                return Maybe.Just(symbol(MP_OR));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> metapattern_directive_action_16() throws Scanner.Exception {
            //System.err.println("state_layout.inst_metapattern_directive.metapattern_directive_action_16()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/abstract_comment.mlc [10, 11]
                /* ignore */
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> metapattern_directive_action_17() throws Scanner.Exception {
            //System.err.println("state_layout.inst_metapattern_directive.metapattern_directive_action_17()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/metapattern_directive.mlc [37, 20]
                return Maybe.Just(symbol(MP_REGION, yytext().substring(1, yylength() - 1)));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> metapattern_directive_action_18() throws Scanner.Exception {
            //System.err.println("state_layout.inst_metapattern_directive.metapattern_directive_action_18()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/metapattern_directive.mlc [38, 14]
                return Maybe.Just(symbol(MP_SYM, yytext()));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> metapattern_directive_action_19() throws Scanner.Exception {
            //System.err.println("state_layout.inst_metapattern_directive.metapattern_directive_action_19()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/metapattern_directive.mlc [42, 9]
                error("Unexpected character in meta-pattern: " + yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> metapattern_directive_action_20() throws Scanner.Exception {
            //System.err.println("state_layout.inst_metapattern_directive.metapattern_directive_action_20()");
            return Maybe.Nothing();
        }
    }
    //from test/backend-jflex/in/metalexer/pair_directive.mlc [1, 1]
    private class CompClass_pair_directive extends ComponentInnerClass {
        
        public CompClass_pair_directive() {
        }
        
        private static final int YYINITIAL = pair_directive_YYINITIAL_STATE; //from test/backend-jflex/in/metalexer/pair_directive.mlc [1, 1]
        
        
        public int getStartState() {
            //from test/backend-jflex/in/metalexer/pair_directive.mlc [1, 1]
            return YYINITIAL;
        }
        
        public char getCharValue() {
            return '\u0052';
        }
        
        public Maybe<? extends Symbol> pair_directive_action_1() throws Scanner.Exception {
            //System.err.println("state_layout.inst_pair_directive.pair_directive_action_1()");
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> pair_directive_action_2() throws Scanner.Exception {
            //System.err.println("state_layout.inst_pair_directive.pair_directive_action_2()");
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> pair_directive_action_3() throws Scanner.Exception {
            //System.err.println("state_layout.inst_pair_directive.pair_directive_action_3()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/pair_directive.mlc [19, 19]
                /* ignore */
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> pair_directive_action_4() throws Scanner.Exception {
            //System.err.println("state_layout.inst_pair_directive.pair_directive_action_4()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/pair_directive.mlc [21, 5]
                return Maybe.Just(symbol(COMMA));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> pair_directive_action_5() throws Scanner.Exception {
            //System.err.println("state_layout.inst_pair_directive.pair_directive_action_5()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/abstract_comment.mlc [10, 11]
                /* ignore */
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> pair_directive_action_6() throws Scanner.Exception {
            //System.err.println("state_layout.inst_pair_directive.pair_directive_action_6()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/pair_directive.mlc [25, 20]
                return Maybe.Just(symbol(MP_REGION, yytext().substring(1, yylength() - 1)));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> pair_directive_action_7() throws Scanner.Exception {
            //System.err.println("state_layout.inst_pair_directive.pair_directive_action_7()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/pair_directive.mlc [26, 14]
                return Maybe.Just(symbol(MP_SYM, yytext()));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> pair_directive_action_8() throws Scanner.Exception {
            //System.err.println("state_layout.inst_pair_directive.pair_directive_action_8()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/pair_directive.mlc [30, 9]
                error("Unexpected character in pair item: " + yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> pair_directive_action_9() throws Scanner.Exception {
            //System.err.println("state_layout.inst_pair_directive.pair_directive_action_9()");
            return Maybe.Nothing();
        }
    }
    //from test/backend-jflex/in/metalexer/string.mlc [1, 1]
    private class CompClass_string extends ComponentInnerClass {
        
        public CompClass_string() {
        }
        
        private static final int YYINITIAL = string_YYINITIAL_STATE; //from test/backend-jflex/in/metalexer/string.mlc [1, 1]
        
        public boolean isAppend() {
            return true;
        }
        public Maybe<? extends Symbol> performAppendAction(int startLine, int startCol, int endLine, int endCol, String text) throws Scanner.Exception {
            if(Object.class != null) {
                //from null [6, 1]
                /*(int startLine, int startCol, int endLine, int endCol, String text)*/
    //TODO-AC: inserting delimiters is hackish
    return Maybe.Just(symbol(STRING, "\"" + text + "\"", startLine, startCol, endLine, endCol));
            }
            return Maybe.Nothing();
        }
        public <T> void append(T t) {
            state_layout.append(t);
        }
        
        public int getStartState() {
            //from test/backend-jflex/in/metalexer/string.mlc [1, 1]
            return YYINITIAL;
        }
        
        public char getCharValue() {
            return '\u0054';
        }
        
        public Maybe<? extends Symbol> string_action_1() throws Scanner.Exception {
            //System.err.println("state_layout.inst_string.string_action_1()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/string.mlc [22, 9]
                /*just end string - %append will handle token*/
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_action_2() throws Scanner.Exception {
            //System.err.println("state_layout.inst_string.string_action_2()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/string.mlc [23, 18]
                append(yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_action_3() throws Scanner.Exception {
            //System.err.println("state_layout.inst_string.string_action_3()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/string.mlc [24, 11]
                error("Invalid escape sequence: '" + yytext() + "'");
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_action_4() throws Scanner.Exception {
            //System.err.println("state_layout.inst_string.string_action_4()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/string.mlc [25, 4]
                error("Incomplete escape sequence");
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_action_5() throws Scanner.Exception {
            //System.err.println("state_layout.inst_string.string_action_5()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/string.mlc [26, 18]
                error("Unterminated string literal");
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_action_6() throws Scanner.Exception {
            //System.err.println("state_layout.inst_string.string_action_6()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/string.mlc [29, 9]
                append(yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_action_7() throws Scanner.Exception {
            //System.err.println("state_layout.inst_string.string_action_7()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/string.mlc [30, 9]
                error("Unterminated string literal");
            }
            return Maybe.Nothing();
        }
    }
    //from test/backend-jflex/in/metalexer/string_directive.mlc [1, 1]
    private class CompClass_string_directive extends ComponentInnerClass {
        
        public CompClass_string_directive() {
        }
        
        private static final int YYINITIAL = string_directive_YYINITIAL_STATE; //from test/backend-jflex/in/metalexer/string_directive.mlc [1, 1]
        
        
        public int getStartState() {
            //from test/backend-jflex/in/metalexer/string_directive.mlc [1, 1]
            return YYINITIAL;
        }
        
        public char getCharValue() {
            return '\u0056';
        }
        
        public Maybe<? extends Symbol> string_directive_action_1() throws Scanner.Exception {
            //System.err.println("state_layout.inst_string_directive.string_directive_action_1()");
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_directive_action_2() throws Scanner.Exception {
            //System.err.println("state_layout.inst_string_directive.string_directive_action_2()");
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_directive_action_3() throws Scanner.Exception {
            //System.err.println("state_layout.inst_string_directive.string_directive_action_3()");
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_directive_action_4() throws Scanner.Exception {
            //System.err.println("state_layout.inst_string_directive.string_directive_action_4()");
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_directive_action_5() throws Scanner.Exception {
            //System.err.println("state_layout.inst_string_directive.string_directive_action_5()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/string_directive.mlc [18, 3]
                return Maybe.Just(symbol(COMMA));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_directive_action_6() throws Scanner.Exception {
            //System.err.println("state_layout.inst_string_directive.string_directive_action_6()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/abstract_comment.mlc [10, 11]
                /* ignore */
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_directive_action_7() throws Scanner.Exception {
            //System.err.println("state_layout.inst_string_directive.string_directive_action_7()");
            if(Object.class != null) {
                //from test/backend-jflex/in/metalexer/string_directive.mlc [21, 9]
                error("Unexpected character in string list: " + yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_directive_action_8() throws Scanner.Exception {
            //System.err.println("state_layout.inst_string_directive.string_directive_action_8()");
            return Maybe.Nothing();
        }
    }
    private static class PairFilter {
        public static final PairFilter EMPTY = new PairFilter.Builder().build();
        
        private final java.util.Map<Character, java.util.Set<Character>> pairMap; //close -> open
        private final java.util.Set<Character> allOpenChars;
        private final java.util.List<Character> unclosedOpenChars; //really a stack, but then the iterator would go backwards
        
        private PairFilter(java.util.Map<Character, java.util.Set<Character>> pairMap, java.util.Set<Character> allOpenChars) {
            this.pairMap = pairMap;
            this.allOpenChars = allOpenChars;
            this.unclosedOpenChars = new java.util.ArrayList<Character>();
        }
        
        public static class Builder {
            private final java.util.Map<Character, java.util.Set<Character>> pairMap; //close -> open
            private final java.util.Set<Character> allOpenChars;
            
            public Builder() {
                this.pairMap = new java.util.HashMap<Character, java.util.Set<Character>>();
                this.allOpenChars = new java.util.HashSet<Character>();
            }
            
            public Builder add(char open, char close) {
                allOpenChars.add(open);
                java.util.Set<Character> list = pairMap.get(close);
                if(list == null) {
                    list = new java.util.HashSet<Character>();
                    pairMap.put(close, list);
                }
                list.add(open);
                return this;
            }
            
            public PairFilter build() {
                return new PairFilter(pairMap, allOpenChars);
            }
        }
        
        public boolean test(char ch) {
            //NB: closing-ness takes precedence over opening-ness
            java.util.Set<Character> correspondingOpens = pairMap.get(ch);
            if(correspondingOpens != null) { //implies closing
                for(java.util.Iterator<Character> it = unclosedOpenChars.iterator(); it.hasNext(); ) {
                    char open = it.next();
                    if(correspondingOpens.contains(open)) {
                        //if closing and have seen corresponding open, then close open and reject
                        it.remove();
                        return false;
                    }
                }
                //if closing and have not seen corresponding open, then accept
            }
            if(allOpenChars.contains(ch)) { //implies opening
                unclosedOpenChars.add(0, ch); //insert at beginning
            }
            return true;
        }
        
        public void reset() {
            unclosedOpenChars.clear();
        }
    }
    public class EmbeddingRecord {
        private final ComponentInnerClass comp;
        private final PairFilter filter;
        
        public EmbeddingRecord(ComponentInnerClass comp, PairFilter filter) {
            this.comp = comp;
            this.filter = filter;
        }
        
        public ComponentInnerClass getComp() {
            return comp;
        }
        
        public PairFilter getFilter() {
            return filter;
        }
    }
    public static class Pipe extends java.io.Reader {
        private final java.util.concurrent.locks.Lock monitorLock = new java.util.concurrent.locks.ReentrantLock();
        private final java.util.Queue<java.util.concurrent.locks.Condition> waitingForFirstRead = new java.util.LinkedList<java.util.concurrent.locks.Condition>();
        private java.util.Map<Thread, java.util.concurrent.locks.Condition> waitingForSecondRead = new java.util.HashMap<Thread, java.util.concurrent.locks.Condition>();
        
        private final java.util.Queue<Character> writeQueue = new java.util.LinkedList<Character>();
        private final java.util.concurrent.locks.Condition notEmpty = monitorLock.newCondition();
        
        private boolean closed = false;
        private boolean eof = false;
        
        public void write(char ch) {
            write(ch, false);
        }
        
        //NB: combine write() with eof() because the last write() will block, making it hard to call eof()
        public void writeFinal(char ch) {
            write(ch, true);
        }
        
        private void write(char ch, boolean isFinal) {
            monitorLock.lock();
            try {
                if(closed) {
                    throw new IllegalStateException("Cannot write after the read end has been closed.");
                }
                if(eof) {
                    throw new IllegalStateException("Cannot write after EOF.");
                }
                if(isFinal) {
                    eof = true;
                }
                writeQueue.add(ch);
                java.util.concurrent.locks.Condition cond = monitorLock.newCondition();
                waitingForFirstRead.add(cond);
                notEmpty.signalAll();
                cond.awaitUninterruptibly();
            } finally {
                monitorLock.unlock();
            }
        }
        
        @Override
        //NB: ignore length and always write 1 byte (unless at EOF)
        public int read(char[] buf, int offset, int length) throws java.io.IOException {
            monitorLock.lock();
            try {
                if(closed) {
                    throw new IllegalStateException("Cannot read after the read end has been closed.");
                }
                boolean freedWriter = freeNextWriter();
                while(!eof && writeQueue.isEmpty()) {
                    notEmpty.awaitUninterruptibly();
                    if(!freedWriter) {
                        freedWriter = freeNextWriter();
                    }
                }
                if(eof && writeQueue.isEmpty()) {
                    //no writers waiting, so none to free
                    return -1;
                }
                waitingForSecondRead.put(Thread.currentThread(), waitingForFirstRead.poll());
                buf[offset] = writeQueue.poll();
                return 1;
            } finally {
                monitorLock.unlock();
            }
        }
        
        @Override
        public void close() throws java.io.IOException {
            monitorLock.lock();
            try {
                closed = true;
                freeAllWriters();
            } finally {
                monitorLock.unlock();
            }
        }
        
        //NB: didn't bother with monitorLock because this method is always called safely
        private boolean freeNextWriter() {
            java.util.concurrent.locks.Condition cond = waitingForSecondRead.get(Thread.currentThread());
            if(cond != null) {
                cond.signal();
                waitingForSecondRead.remove(Thread.currentThread());
                return true;
            }
            return false;
        }
        
        //NB: didn't bother with monitorLock because this method is always called safely
        private void freeAllWriters() {
            for(java.util.concurrent.locks.Condition cond : waitingForSecondRead.values()) {
                cond.signal();
            }
            waitingForSecondRead.clear();
            for(java.util.concurrent.locks.Condition cond : waitingForFirstRead) {
                cond.signal();
            }
            waitingForFirstRead.clear();
        }
    }
    private static abstract class Maybe<T> {
        @SuppressWarnings("unchecked")
        private final static Maybe NOTHING = new Nothing();
        
        private Maybe() {}
        
        public final boolean isJust() {
            return !isNothing();
        }
        public abstract boolean isNothing();
        
        public abstract T fromJust();
        
        public static <S> Maybe<S> Just(S value) {
            return new Just<S>(value);
        }
        
        @SuppressWarnings("unchecked")
        public static <S> Maybe<S> Nothing() {
            return (Nothing<S>) NOTHING;
        }
        
        private static class Just<T> extends Maybe<T> {
            private T value;
            
            private Just(T value) {
                this.value = value;
            }
            
            public boolean isNothing() {
                return false;
            }
            
            public T fromJust() {
                return value;
            }
            
            public String toString() { 
                return "Just " + value;
            }
        }
        
        private static class Nothing<T> extends Maybe<T> {
            private Nothing() {}
            
            public boolean isNothing() {
                return true;
            }
            
            public T fromJust() {
                throw new UnsupportedOperationException("Cannot extract value from Nothing");
            }
            
            public String toString() {
                return "Nothing";
            }
        }
    }
    public void stop() {
        state_layout.stop();
    }

  //Create a symbol using the current line and column number, as computed by JFlex
  //No attached value
  //Symbol is assumed to start and end on the same line
  //e.g. symbol(SEMICOLON)
  private Symbol symbol(short type) {
    return symbol(type, null);
  }
  
  //Create a symbol using the current line and column number, as computed by JFlex
  //Attached value gives content information
  //Symbol is assumed to start and end on the same line
  //e.g. symbol(IDENTIFIER, "x")
  private Symbol symbol(short type, Object value) {
    //NB: JFlex is zero-indexed, but we want one-indexed
    int startLine = yyline + 1;
    int startCol = yycolumn + 1;
    int endLine = startLine;
    int endCol = startCol + yylength() - 1;
    return symbol(type, value, startLine, startCol, endLine, endCol);
  }
  
  //Create a symbol using explicit position information (one-indexed)
  private Symbol symbol(short type, Object value, int startLine, int startCol, int endLine, int endCol) {
    int startPos = Symbol.makePosition(startLine, startCol);
    int endPos = Symbol.makePosition(endLine, endCol);
    return new Symbol(type, startPos, endPos, value);
  }
  
  //throw an exceptions with position information from JFlex
  private void error(String msg) throws Scanner.Exception {
    //correct to one-indexed
    throw new Scanner.Exception(yyline + 1, yycolumn + 1, msg);
  }
  
  //throw an exceptions with position information from JFlex
  //columnOffset is added to the column
  private void error(String msg, int columnOffset) throws Scanner.Exception {
  //correct to one-indexed
    throw new Scanner.Exception(yyline + 1, yycolumn + 1 + columnOffset, msg);
  }


  /**
   * Creates a new scanner
   * There is also a java.io.InputStream version of this constructor.
   *
   * @param   in  the java.io.Reader to read input from.
   */
  public LayoutScanner(java.io.Reader in) {
    this.zzReader = in;
  }

  /**
   * Creates a new scanner.
   * There is also java.io.Reader version of this constructor.
   *
   * @param   in  the java.io.Inputstream to read input from.
   */
  public LayoutScanner(java.io.InputStream in) {
    this(new java.io.InputStreamReader(in));
  }

  /** 
   * Unpacks the compressed character translation table.
   *
   * @param packed   the packed character translation table
   * @return         the unpacked character translation table
   */
  private static char [] zzUnpackCMap(String packed) {
    char [] map = new char[0x10000];
    int i = 0;  /* index in packed string  */
    int j = 0;  /* index in unpacked array */
    while (i < 154) {
      int  count = packed.charAt(i++);
      char value = packed.charAt(i++);
      do map[j++] = value; while (--count > 0);
    }
    return map;
  }


  /**
   * Refills the input buffer.
   *
   * @return      <code>false</code>, iff there was new input.
   * 
   * @exception   java.io.IOException  if any I/O-Error occurs
   */
  private boolean zzRefill() throws java.io.IOException {

    /* first: make room (if you can) */
    if (zzStartRead > 0) {
      System.arraycopy(zzBuffer, zzStartRead,
                       zzBuffer, 0,
                       zzEndRead-zzStartRead);

      /* translate stored positions */
      zzEndRead-= zzStartRead;
      zzCurrentPos-= zzStartRead;
      zzMarkedPos-= zzStartRead;
      zzPushbackPos-= zzStartRead;
      zzStartRead = 0;
    }

    /* is the buffer big enough? */
    if (zzCurrentPos >= zzBuffer.length) {
      /* if not: blow it up */
      char newBuffer[] = new char[zzCurrentPos*2];
      System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
      zzBuffer = newBuffer;
    }

    /* finally: fill the buffer with new input */
    int numRead = zzReader.read(zzBuffer, zzEndRead,
                                            zzBuffer.length-zzEndRead);

    if (numRead < 0) {
      return true;
    }
    else {
      zzEndRead+= numRead;
      return false;
    }
  }

    
  /**
   * Closes the input stream.
   */
  public final void yyclose() throws java.io.IOException {
    zzAtEOF = true;            /* indicate end of file */
    zzEndRead = zzStartRead;  /* invalidate buffer    */

    if (zzReader != null)
      zzReader.close();
  }


  /**
   * Resets the scanner to read from a new input stream.
   * Does not close the old reader.
   *
   * All internal variables are reset, the old input stream 
   * <b>cannot</b> be reused (internal buffer is discarded and lost).
   * Lexical state is set to <tt>ZZ_INITIAL</tt>.
   *
   * @param reader   the new input stream 
   */
  public final void yyreset(java.io.Reader reader) {
    zzReader = reader;
    zzAtBOL  = true;
    zzAtEOF  = false;
    zzEndRead = zzStartRead = 0;
    zzCurrentPos = zzMarkedPos = zzPushbackPos = 0;
    yyline = yychar = yycolumn = 0;
    zzLexicalState = YYINITIAL;
  }


  /**
   * Returns the current lexical state.
   */
  public final int yystate() {
    return zzLexicalState;
  }


  /**
   * Enters a new lexical state
   *
   * @param newState the new lexical state
   */
  public final void yybegin(int newState) {
    zzLexicalState = newState;
  }


  /**
   * Returns the text matched by the current regular expression.
   */
  public final String yytext() {
    return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
  }


  /**
   * Returns the character at position <tt>pos</tt> from the 
   * matched text. 
   * 
   * It is equivalent to yytext().charAt(pos), but faster
   *
   * @param pos the position of the character to fetch. 
   *            A value from 0 to yylength()-1.
   *
   * @return the character at position pos
   */
  public final char yycharat(int pos) {
    return zzBuffer[zzStartRead+pos];
  }


  /**
   * Returns the length of the matched text region.
   */
  public final int yylength() {
    return zzMarkedPos-zzStartRead;
  }


  /**
   * Reports an error that occured while scanning.
   *
   * In a wellformed scanner (no or only correct usage of 
   * yypushback(int) and a match-all fallback rule) this method 
   * will only be called with things that "Can't Possibly Happen".
   * If this method is called, something is seriously wrong
   * (e.g. a JFlex bug producing a faulty scanner etc.).
   *
   * Usual syntax/scanner level error handling should be done
   * in error fallback rules.
   *
   * @param   errorCode  the code of the errormessage to display
   */
  private void zzScanError(int errorCode) {
    String message;
    try {
      message = ZZ_ERROR_MSG[errorCode];
    }
    catch (ArrayIndexOutOfBoundsException e) {
      message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
    }

    throw new Error(message);
  } 


  /**
   * Pushes the specified amount of characters back into the input stream.
   *
   * They will be read again by then next call of the scanning method
   *
   * @param number  the number of characters to be read again.
   *                This number must not be greater than yylength()!
   */
  public void yypushback(int number)  {
    if ( number > yylength() )
      zzScanError(ZZ_PUSHBACK_2BIG);

    zzMarkedPos -= number;
  }


  /**
   * Resumes scanning until the next regular expression is matched,
   * the end of input is encountered or an I/O-Error occurs.
   *
   * @return      the next token
   * @exception   java.io.IOException  if any I/O-Error occurs
   */
  public Symbol nextToken() throws java.io.IOException, Scanner.Exception {
    int zzInput;
    int zzAction;

    // cached fields:
    int zzCurrentPosL;
    int zzMarkedPosL;
    int zzEndReadL = zzEndRead;
    char [] zzBufferL = zzBuffer;
    char [] zzCMapL = ZZ_CMAP;

    int [] zzTransL = ZZ_TRANS;
    int [] zzRowMapL = ZZ_ROWMAP;
    int [] zzAttrL = ZZ_ATTRIBUTE;
    int zzPushbackPosL = zzPushbackPos = -1;
    boolean zzWasPushback;

    while (true) {
      zzMarkedPosL = zzMarkedPos;

      boolean zzR = false;
      for (zzCurrentPosL = zzStartRead; zzCurrentPosL < zzMarkedPosL;
                                                             zzCurrentPosL++) {
        switch (zzBufferL[zzCurrentPosL]) {
        case '\u000B':
        case '\u000C':
        case '\u0085':
        case '\u2028':
        case '\u2029':
          yyline++;
          yycolumn = 0;
          zzR = false;
          break;
        case '\r':
          yyline++;
          yycolumn = 0;
          zzR = true;
          break;
        case '\n':
          if (zzR)
            zzR = false;
          else {
            yyline++;
            yycolumn = 0;
          }
          break;
        default:
          zzR = false;
          yycolumn++;
        }
      }

      if (zzR) {
        // peek one character ahead if it is \n (if we have counted one line too much)
        boolean zzPeek;
        if (zzMarkedPosL < zzEndReadL)
          zzPeek = zzBufferL[zzMarkedPosL] == '\n';
        else if (zzAtEOF)
          zzPeek = false;
        else {
          boolean eof = zzRefill();
          zzEndReadL = zzEndRead;
          zzMarkedPosL = zzMarkedPos;
          zzBufferL = zzBuffer;
          if (eof) 
            zzPeek = false;
          else 
            zzPeek = zzBufferL[zzMarkedPosL] == '\n';
        }
        if (zzPeek) yyline--;
      }
      zzAction = -1;

      zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
  
      zzState = zzLexicalState;

      zzWasPushback = false;

      zzForAction: {
        while (true) {
    
          if (zzCurrentPosL < zzEndReadL)
            zzInput = zzBufferL[zzCurrentPosL++];
          else if (zzAtEOF) {
            zzInput = YYEOF;
            break zzForAction;
          }
          else {
            // store back cached positions
            zzCurrentPos  = zzCurrentPosL;
            zzMarkedPos   = zzMarkedPosL;
            zzPushbackPos = zzPushbackPosL;
            boolean eof = zzRefill();
            // get translated positions and possibly new buffer
            zzCurrentPosL  = zzCurrentPos;
            zzMarkedPosL   = zzMarkedPos;
            zzBufferL      = zzBuffer;
            zzEndReadL     = zzEndRead;
            zzPushbackPosL = zzPushbackPos;
            if (eof) {
              zzInput = YYEOF;
              break zzForAction;
            }
            else {
              zzInput = zzBufferL[zzCurrentPosL++];
            }
          }
          int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
          if (zzNext == -1) break zzForAction;
          zzState = zzNext;

          int zzAttributes = zzAttrL[zzState];
          if ( (zzAttributes & 2) == 2 )
            zzPushbackPosL = zzCurrentPosL;

          if ( (zzAttributes & 1) == 1 ) {
            zzWasPushback = (zzAttributes & 4) == 4;
            zzAction = zzState;
            zzMarkedPosL = zzCurrentPosL;
            if ( (zzAttributes & 8) == 8 ) break zzForAction;
          }

        }
      }

      // store back cached position
      zzMarkedPos = zzMarkedPosL;
      if (zzWasPushback)
        zzMarkedPos = zzPushbackPosL;

      switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
        case 12: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_option_section.layout_option_section_action_17();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 97: break;
        case 68: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_decl_region.decl_region_action_1();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 98: break;
        case 83: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_init_region.init_region_action_1();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 99: break;
        case 1: 
          { //System.err.println("Reconsume char");
        yybegin(state_layout.getPrevState());
        return state_layout.getExtraReturn();
          }
        case 100: break;
        case 32: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_metapattern_directive.metapattern_directive_action_15();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 101: break;
        case 55: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_option_section.layout_option_section_action_15();
        //System.err.println("processMTok(END_OPTION_SECTION)");
        state_layout.processMTok('\u0049'); //END_OPTION_SECTION
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 102: break;
        case 78: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_init_region.init_region_action_2();
        //System.err.println("processMTok(END_INIT_REGION)");
        state_layout.processMTok('\u0043'); //END_INIT_REGION
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 103: break;
        case 39: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_string.string_action_5();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 104: break;
        case 51: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_identifier_directive.identifier_directive_action_1();
        //System.err.println("processMTok(START_BRACKET_COMMENT)");
        state_layout.processMTok('\u0033'); //START_BRACKET_COMMENT
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 105: break;
        case 52: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_inherited_header.inherited_header_action_1();
        //System.err.println("processMTok(END_INHERITED_HEADER)");
        state_layout.processMTok('\u0041'); //END_INHERITED_HEADER
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 106: break;
        case 19: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_local_header.local_header_action_2();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 107: break;
        case 95: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_option_section.layout_option_section_action_12();
        //System.err.println("processMTok(START_STRING_DIRECTIVE)");
        state_layout.processMTok('\u0048'); //START_STRING_DIRECTIVE
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 108: break;
        case 60: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_metapattern_directive.metapattern_directive_action_16();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 109: break;
        case 38: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_string.string_action_6();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 110: break;
        case 35: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_pair_directive.pair_directive_action_3();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 111: break;
        case 4: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_decl_region.decl_region_action_3();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 112: break;
        case 11: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_init_region.init_region_action_3();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 113: break;
        case 69: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_metapattern_directive.metapattern_directive_action_17();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 114: break;
        case 14: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_option_section.layout_option_section_action_2();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 115: break;
        case 17: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_rule_section.layout_rule_section_action_2();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 116: break;
        case 37: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_pair_directive.pair_directive_action_4();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 117: break;
        case 7: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_identifier_directive.identifier_directive_action_3();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 118: break;
        case 86: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_option_section.layout_option_section_action_11();
        //System.err.println("processMTok(START_STRING_DIRECTIVE)");
        state_layout.processMTok('\u0048'); //START_STRING_DIRECTIVE
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 119: break;
        case 61: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_metapattern_directive.metapattern_directive_action_1();
        //System.err.println("processMTok(START_BRACKET_COMMENT)");
        state_layout.processMTok('\u0033'); //START_BRACKET_COMMENT
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 120: break;
        case 43: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_string_directive.string_directive_action_2();
        //System.err.println("processMTok(END_STRING_DIRECTIVE)");
        state_layout.processMTok('\u0057'); //END_STRING_DIRECTIVE
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 121: break;
        case 24: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_metapattern_directive.metapattern_directive_action_18();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 122: break;
        case 45: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_string_directive.string_directive_action_4();
        //System.err.println("processMTok(START_STRING)");
        state_layout.processMTok('\u0058'); //START_STRING
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 123: break;
        case 15: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_option_section.layout_option_section_action_3();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 124: break;
        case 18: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_rule_section.layout_rule_section_action_3();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 125: break;
        case 62: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_pair_directive.pair_directive_action_5();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 126: break;
        case 23: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_metapattern_directive.metapattern_directive_action_3();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 127: break;
        case 9: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_identifier_directive.identifier_directive_action_4();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 128: break;
        case 81: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_rule_section.layout_rule_section_action_12();
        //System.err.println("processMTok(START_METAPATTERN_DIRECTIVE)");
        state_layout.processMTok('\u004c'); //START_METAPATTERN_DIRECTIVE
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 129: break;
        case 20: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_metapattern_directive.metapattern_directive_action_19();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 130: break;
        case 22: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_metapattern_directive.metapattern_directive_action_2();
        //System.err.println("processMTok(END_METAPATTERN_DIRECTIVE)");
        state_layout.processMTok('\u0051'); //END_METAPATTERN_DIRECTIVE
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 131: break;
        case 96: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_option_section.layout_option_section_action_9();
        //System.err.println("processMTok(START_IDENTIFIER_DIRECTIVE)");
        state_layout.processMTok('\u0047'); //START_IDENTIFIER_DIRECTIVE
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 132: break;
        case 87: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_rule_section.layout_rule_section_action_4();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 133: break;
        case 70: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_pair_directive.pair_directive_action_6();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 134: break;
        case 80: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_option_section.layout_option_section_action_8();
        //System.err.println("processMTok(START_IDENTIFIER_DIRECTIVE)");
        state_layout.processMTok('\u0047'); //START_IDENTIFIER_DIRECTIVE
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 135: break;
        case 3: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_bracket_comment.bracket_comment_action_3();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 136: break;
        case 85: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_option_section.layout_option_section_action_7();
        //System.err.println("processMTok(START_IDENTIFIER_DIRECTIVE)");
        state_layout.processMTok('\u0047'); //START_IDENTIFIER_DIRECTIVE
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 137: break;
        case 44: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_string_directive.string_directive_action_3();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 138: break;
        case 75: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_metapattern_directive.metapattern_directive_action_4();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 139: break;
        case 89: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_option_section.layout_option_section_action_10();
        //System.err.println("processMTok(START_STRING_DIRECTIVE)");
        state_layout.processMTok('\u0048'); //START_STRING_DIRECTIVE
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 140: break;
        case 74: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_rule_section.layout_rule_section_action_11();
        //System.err.println("processMTok(START_PAIR_DIRECTIVE)");
        state_layout.processMTok('\u004b'); //START_PAIR_DIRECTIVE
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 141: break;
        case 50: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_identifier_directive.identifier_directive_action_5();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 142: break;
        case 36: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_pair_directive.pair_directive_action_7();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 143: break;
        case 76: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_metapattern_directive.metapattern_directive_action_5();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 144: break;
        case 8: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_identifier_directive.identifier_directive_action_6();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 145: break;
        case 57: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_rule_section.layout_rule_section_action_16();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 146: break;
        case 28: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_metapattern_directive.metapattern_directive_action_10();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 147: break;
        case 84: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_option_section.layout_option_section_action_6();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 148: break;
        case 33: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_pair_directive.pair_directive_action_8();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 149: break;
        case 73: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_rule_section.layout_rule_section_action_9();
        //System.err.println("processMTok(START_IDENTIFIER_DIRECTIVE)");
        state_layout.processMTok('\u0047'); //START_IDENTIFIER_DIRECTIVE
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 150: break;
        case 46: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_string_directive.string_directive_action_5();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 151: break;
        case 77: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_metapattern_directive.metapattern_directive_action_6();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 152: break;
        case 47: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_bracket_comment.bracket_comment_action_1();
        //System.err.println("processMTok(START_BRACKET_COMMENT)");
        state_layout.processMTok('\u0033'); //START_BRACKET_COMMENT
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 153: break;
        case 5: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_identifier_directive.identifier_directive_action_7();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 154: break;
        case 40: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_string.string_action_1();
        //System.err.println("processMTok(END_STRING)");
        state_layout.processMTok('\u0055'); //END_STRING
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 155: break;
        case 16: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_rule_section.layout_rule_section_action_17();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 156: break;
        case 29: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_metapattern_directive.metapattern_directive_action_11();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 157: break;
        case 88: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_rule_section.layout_rule_section_action_15();
        //System.err.println("processMTok(START_IDENTIFIER_DIRECTIVE)");
        state_layout.processMTok('\u0047'); //START_IDENTIFIER_DIRECTIVE
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 158: break;
        case 93: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_rule_section.layout_rule_section_action_14();
        //System.err.println("processMTok(START_IDENTIFIER_DIRECTIVE)");
        state_layout.processMTok('\u0047'); //START_IDENTIFIER_DIRECTIVE
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 159: break;
        case 63: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_pair_directive.pair_directive_action_1();
        //System.err.println("processMTok(START_BRACKET_COMMENT)");
        state_layout.processMTok('\u0033'); //START_BRACKET_COMMENT
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 160: break;
        case 66: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_string_directive.string_directive_action_6();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 161: break;
        case 71: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_rule_section.layout_rule_section_action_13();
        //System.err.println("processMTok(START_METAPATTERN_DIRECTIVE)");
        state_layout.processMTok('\u004c'); //START_METAPATTERN_DIRECTIVE
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 162: break;
        case 25: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_metapattern_directive.metapattern_directive_action_7();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 163: break;
        case 13: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_option_section.layout_option_section_action_14();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 164: break;
        case 79: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_option_section.layout_option_section_action_5();
        //System.err.println("processMTok(START_INIT_REGION)");
        state_layout.processMTok('\u0046'); //START_INIT_REGION
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 165: break;
        case 72: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_rule_section.layout_rule_section_action_8();
        //System.err.println("processMTok(START_IDENTIFIER_DIRECTIVE)");
        state_layout.processMTok('\u0047'); //START_IDENTIFIER_DIRECTIVE
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 166: break;
        case 94: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_rule_section.layout_rule_section_action_7();
        //System.err.println("processMTok(START_IDENTIFIER_DIRECTIVE)");
        state_layout.processMTok('\u0047'); //START_IDENTIFIER_DIRECTIVE
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 167: break;
        case 34: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_pair_directive.pair_directive_action_2();
        //System.err.println("processMTok(END_PAIR_DIRECTIVE)");
        state_layout.processMTok('\u0053'); //END_PAIR_DIRECTIVE
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 168: break;
        case 10: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_inherited_header.inherited_header_action_2();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 169: break;
        case 90: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_rule_section.layout_rule_section_action_6();
        //System.err.println("processMTok(START_IDENTIFIER_DIRECTIVE)");
        state_layout.processMTok('\u0047'); //START_IDENTIFIER_DIRECTIVE
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 170: break;
        case 21: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_metapattern_directive.metapattern_directive_action_12();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 171: break;
        case 65: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_string.string_action_2();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 172: break;
        case 42: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_string_directive.string_directive_action_7();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 173: break;
        case 2: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_base.base_action_1();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 174: break;
        case 26: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_metapattern_directive.metapattern_directive_action_8();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 175: break;
        case 67: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_string_directive.string_directive_action_1();
        //System.err.println("processMTok(START_BRACKET_COMMENT)");
        state_layout.processMTok('\u0033'); //START_BRACKET_COMMENT
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 176: break;
        case 6: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_identifier_directive.identifier_directive_action_2();
        //System.err.println("processMTok(END_IDENTIFIER_DIRECTIVE)");
        state_layout.processMTok('\u0038'); //END_IDENTIFIER_DIRECTIVE
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 177: break;
        case 92: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_option_section.layout_option_section_action_13();
        //System.err.println("processMTok(START_STRING_DIRECTIVE)");
        state_layout.processMTok('\u0048'); //START_STRING_DIRECTIVE
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 178: break;
        case 82: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_rule_section.layout_rule_section_action_10();
        //System.err.println("processMTok(START_IDENTIFIER_DIRECTIVE)");
        state_layout.processMTok('\u0047'); //START_IDENTIFIER_DIRECTIVE
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 179: break;
        case 30: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_metapattern_directive.metapattern_directive_action_13();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 180: break;
        case 58: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_rule_section.layout_rule_section_action_1();
        //System.err.println("processMTok(START_BRACKET_COMMENT)");
        state_layout.processMTok('\u0033'); //START_BRACKET_COMMENT
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 181: break;
        case 49: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_decl_region.decl_region_action_2();
        //System.err.println("processMTok(END_DECL_REGION)");
        state_layout.processMTok('\u0036'); //END_DECL_REGION
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 182: break;
        case 56: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_option_section.layout_option_section_action_4();
        //System.err.println("processMTok(START_DECL_REGION)");
        state_layout.processMTok('\u0045'); //START_DECL_REGION
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 183: break;
        case 64: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_string.string_action_3();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 184: break;
        case 91: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_rule_section.layout_rule_section_action_5();
        //System.err.println("processMTok(START_IDENTIFIER_DIRECTIVE)");
        state_layout.processMTok('\u0047'); //START_IDENTIFIER_DIRECTIVE
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 185: break;
        case 54: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_option_section.layout_option_section_action_1();
        //System.err.println("processMTok(START_BRACKET_COMMENT)");
        state_layout.processMTok('\u0033'); //START_BRACKET_COMMENT
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 186: break;
        case 27: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_metapattern_directive.metapattern_directive_action_9();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 187: break;
        case 53: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_option_section.layout_option_section_action_16();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 188: break;
        case 48: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_bracket_comment.bracket_comment_action_2();
        //System.err.println("processMTok(END_BRACKET_COMMENT)");
        state_layout.processMTok('\u0034'); //END_BRACKET_COMMENT
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 189: break;
        case 59: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_local_header.local_header_action_1();
        //System.err.println("processMTok(END_LOCAL_HEADER)");
        state_layout.processMTok('\u004f'); //END_LOCAL_HEADER
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 190: break;
        case 31: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_metapattern_directive.metapattern_directive_action_14();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 191: break;
        case 41: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_string.string_action_4();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 192: break;
        default: 
          if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
            zzAtEOF = true;
            switch (zzLexicalState) {
            case layout_rule_section_YYINITIAL_STATE: {
              Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_rule_section.layout_rule_section_action_18();
        //System.err.println("processMTok(END_RULE_SECTION)");
        state_layout.processMTok('\u004d'); //END_RULE_SECTION
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
            }
            case 303: break;
            case base_YYINITIAL_STATE: {
              Maybe<? extends Symbol> maybeResult = state_layout.inst_base.base_action_2();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
            }
            case 304: break;
            case string_directive_YYINITIAL_STATE: {
              Maybe<? extends Symbol> maybeResult = state_layout.inst_string_directive.string_directive_action_8();
        //System.err.println("processMTok(END_STRING_DIRECTIVE)");
        state_layout.processMTok('\u0057'); //END_STRING_DIRECTIVE
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
            }
            case 305: break;
            case local_header_YYINITIAL_STATE: {
              Maybe<? extends Symbol> maybeResult = state_layout.inst_local_header.local_header_action_3();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
            }
            case 306: break;
            case decl_region_YYINITIAL_STATE: {
              Maybe<? extends Symbol> maybeResult = state_layout.inst_decl_region.decl_region_action_4();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
            }
            case 307: break;
            case inherited_header_YYINITIAL_STATE: {
              Maybe<? extends Symbol> maybeResult = state_layout.inst_inherited_header.inherited_header_action_3();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
            }
            case 308: break;
            case layout_option_section_YYINITIAL_STATE: {
              Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_option_section.layout_option_section_action_18();
        //System.err.println("processMTok(END_OPTION_SECTION)");
        state_layout.processMTok('\u0049'); //END_OPTION_SECTION
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
            }
            case 309: break;
            case string_YYINITIAL_STATE: {
              Maybe<? extends Symbol> maybeResult = state_layout.inst_string.string_action_7();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
            }
            case 310: break;
            case bracket_comment_YYINITIAL_STATE: {
              Maybe<? extends Symbol> maybeResult = state_layout.inst_bracket_comment.bracket_comment_action_4();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
            }
            case 311: break;
            case init_region_YYINITIAL_STATE: {
              Maybe<? extends Symbol> maybeResult = state_layout.inst_init_region.init_region_action_4();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
            }
            case 312: break;
            case metapattern_directive_YYINITIAL_STATE: {
              Maybe<? extends Symbol> maybeResult = state_layout.inst_metapattern_directive.metapattern_directive_action_20();
        //System.err.println("processMTok(END_METAPATTERN_DIRECTIVE)");
        state_layout.processMTok('\u0051'); //END_METAPATTERN_DIRECTIVE
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
            }
            case 313: break;
            case identifier_directive_YYINITIAL_STATE: {
              Maybe<? extends Symbol> maybeResult = state_layout.inst_identifier_directive.identifier_directive_action_8();
        //System.err.println("processMTok(END_IDENTIFIER_DIRECTIVE)");
        state_layout.processMTok('\u0038'); //END_IDENTIFIER_DIRECTIVE
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
            }
            case 314: break;
            case pair_directive_YYINITIAL_STATE: {
              Maybe<? extends Symbol> maybeResult = state_layout.inst_pair_directive.pair_directive_action_9();
        //System.err.println("processMTok(END_PAIR_DIRECTIVE)");
        state_layout.processMTok('\u0053'); //END_PAIR_DIRECTIVE
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
            }
            case 315: break;
            default:
            return null;
            }
          } 
          else {
            zzScanError(ZZ_NO_MATCH);
          }
      }
    }
  }


}
