/* The following code was generated by JFlex 1.4.1 on 6/7/09 3:21 PM */

package metalexer;
//TODO-AC: many of the catchall errors are recoverable - either return a bad token which will be discarded or just discard and make a note.
//TODO-AC: meta-pattern macros?
//based on http://jflex.de/manual.html

import static 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 6/7/09 3:21 PM from the specification file
 * <tt>/Users/amcasey/Research/metalexer/permgen/jflex/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 base_YYINITIAL_STATE = 2;
  public static final int mpat_directive_YYINITIAL_STATE = 10;
  public static final int string_id_directive_YYINITIAL_STATE = 12;
  public static final int decl_region_YYINITIAL_STATE = 4;
  public static final int EXTRA_RETURN = 1;
  public static final int layout_local_header_YYINITIAL_STATE = 7;
  public static final int YYINITIAL = 0;
  public static final int string_YYINITIAL_STATE = 13;
  public static final int layout_rules_YYINITIAL_STATE = 9;
  public static final int bracket_comment_YYINITIAL_STATE = 3;
  public static final int init_region_YYINITIAL_STATE = 5;
  public static final int layout_inherited_header_YYINITIAL_STATE = 6;
  public static final int layout_options_YYINITIAL_STATE = 8;
  public static final int pair_directive_YYINITIAL_STATE = 11;

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

  private static int [] zzUnpackAction() {
    int [] result = new int[289];
    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\0\0\0"+
    "\0\0\0\u031e\0\u0357\0\0\0\u0390\0\0\0\u03c9\0\0"+
    "\0\u0402\0\0\0\u043b\0\0\0\u0474\0\u04ad\0\u04e6\0\0"+
    "\0\0\0\0\0\u051f\0\u0558\0\u0591\0\0\0\0\0\0"+
    "\0\u05ca\0\0\0\u0603\0\u063c\0\u0675\0\0\0\0\0\u06ae"+
    "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"+
    "\0\0\0\u06e7\0\u0720\0\u0759\0\u0792\0\0\0\0\0\0"+
    "\0\0\0\u07cb\0\u0804\0\u083d\0\0\0\0\0\0\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\u0993\0\0\0\0"+
    "\0\u09cc\0\0\0\u0a05\0\u0a3e\0\u0a77\0\u0ab0\0\u0ae9\0\u0b22"+
    "\0\u0b5b\0\0\0\u0b94\0\u0bcd\0\u0c06\0\u0c3f\0\u0c78\0\u0cb1"+
    "\0\u0cea\0\u0d23\0\u0d5c\0\u0d95\0\0\0\u0dce\0\u0e07\0\u0e40"+
    "\0\u0e79\0\0\0\u0eb2\0\u0eeb\0\0\0\u0f24\0\0\0\0"+
    "\0\u0f5d\0\u0f96\0\u0fcf\0\u1008\0\0\0\u1041\0\u107a\0\u10b3"+
    "\0\u10ec\0\u1125\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\0\0\u14b5\0\u14ee\0\u1527\0\0\0\u1560\0\u1599"+
    "\0\u15d2\0\u160b\0\u1644\0\u167d\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\u1fd7\0\u2010"+
    "\0\u2049\0\u2082\0\0\0\0\0\0\0\0\0\u15d2\0\u20bb"+
    "\0\0\0\u20f4\0\0\0\u212d\0\u2166\0\u219f\0\u21d8\0\u2211"+
    "\0\u224a\0\u2283\0\u22bc\0\u22f5\0\u232e\0\u232e\0\u2367\0\u23a0"+
    "\0\u23d9\0\u2412\0\u2412\0\u244b\0\u244b\0\u2484\0\u24bd\0\0"+
    "\0\u24f6\0\u252f\0\u2568\0\u25a1\0\u25da\0\u2613\0\u2613\0\u264c"+
    "\0\u2685\0\u26be\0\u26f7\0\u2730\0\u2769\0\u27a2\0\u27db\0\u27db"+
    "\0\u2814\0\u2814\0\u284d\0\u2886\0\u2886\0\u28bf\0\u28f8\0\u28f8"+
    "\0\u2931\0\u2931\0\u296a\0\u29a3\0\u29dc\0\u2a15\0\u2a15\0\u2a4e"+
    "\0\u2a87\0\u2ac0\0\u2af9\0\u2b32\0\u2b6b\0\u2ba4\0\u2ba4\0\u2bdd"+
    "\0\u2c16\0\u2c16\0\u2c4f\0\u2c4f\0\u2c88\0\u2cc1\0\u2cfa\0\u2cfa"+
    "\0\u2d33\0\u2d6c\0\u2d6c\0\u2da5\0\u2da5\0\u2dde\0\u2dde\0\u2e17"+
    "\0\u2e17";

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

  private static int [] zzUnpackTrans() {
    int [] result = new int[11856];
    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\15\0\3\11\2\1\1\11\1\1\1\11\1\1"+
    "\1\11\1\1\1\11\1\1\1\11\3\1\3\11\3\1"+
    "\3\11\1\1\1\11\3\1\2\11\1\1\11\11\4\1"+
    "\4\11\3\1\5\11\1\1\2\11\1\1\2\11\1\0"+
    "\1\11\2\0\2\11\1\1\2\11\1\0\1\11\6\0"+
    "\1\1\1\11\11\0\1\1\1\11\3\0\1\1\1\11"+
    "\1\0\1\1\1\11\1\0\2\11\4\1\1\11\24\0"+
    "\1\11\3\0\1\11\1\0\1\1\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\2\0\4\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\2\7\1\11\1\0\1\7\1\0\2\7"+
    "\1\5\4\0\1\7\3\0\1\5\1\0\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\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[289];
    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: */
  //// Returning symbols ///////////////////////////////////////////////////////

  //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 (input is 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);
  }
  //// Errors //////////////////////////////////////////////////////////////////
  
  //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);
  }
    private final StateClass_layout state_layout = new StateClass_layout();
    private class StateClass_layout {
        private StateClass_layout() {
            //from src/frontend/lexer/layout/layout.mll [36, 1]
            embeddingRecordArray[0] = new EmbeddingRecord("local_header", inst_layout_local_header, PairFilter.EMPTY);
            //from src/frontend/lexer/layout/layout.mll [43, 1]
            embeddingRecordArray[1] = new EmbeddingRecord("inherited_header", inst_layout_inherited_header, PairFilter.EMPTY);
            //from src/frontend/lexer/layout/layout.mll [50, 1]
            embeddingRecordArray[2] = new EmbeddingRecord("options_section", inst_layout_options, PairFilter.EMPTY);
            //from src/frontend/lexer/layout/layout.mll [57, 1]
            embeddingRecordArray[3] = new EmbeddingRecord("rules_section", inst_layout_rules, PairFilter.EMPTY);
            //from src/frontend/lexer/layout/layout.mll [64, 1]
            embeddingRecordArray[4] = new EmbeddingRecord("bracket_comments", inst_bracket_comment, PairFilter.EMPTY);
            //from src/frontend/lexer/layout/layout.mll [72, 1]
            embeddingRecordArray[5] = new EmbeddingRecord("init_region", inst_init_region, PairFilter.EMPTY);
            //from src/frontend/lexer/layout/layout.mll [79, 1]
            embeddingRecordArray[6] = new EmbeddingRecord("decl_region", inst_decl_region, PairFilter.EMPTY);
            //from src/frontend/lexer/layout/layout.mll [86, 1]
            embeddingRecordArray[7] = new EmbeddingRecord("string_id_directive", inst_string_id_directive, PairFilter.EMPTY);
            //from src/frontend/lexer/layout/layout.mll [93, 1]
            embeddingRecordArray[8] = new EmbeddingRecord("pair_directive", inst_pair_directive, PairFilter.EMPTY);
            //from src/frontend/lexer/layout/layout.mll [100, 1]
            embeddingRecordArray[9] = new EmbeddingRecord("mpat_directive", inst_mpat_directive, PairFilter.EMPTY);
            //from src/frontend/lexer/layout/layout.mll [107, 1]
            embeddingRecordArray[10] = new EmbeddingRecord("string", inst_string, PairFilter.EMPTY);
            //from src/frontend/lexer/layout/layout.mll [114, 1]
            embeddingRecordArray[11] = new EmbeddingRecord("eof_error", inst_base, PairFilter.EMPTY);
            
            //from src/frontend/lexer/layout/layout.mll [29, 8]
            yybegin(base_YYINITIAL_STATE);
            
            embeddingStack.push(new EmbeddingRecord(null, inst_base, PairFilter.EMPTY));
            
            //Transition through states reachable by pure BOF patterns
            //NB: append actions will not be performed
            startEmbedding(/*local_header*/ 0); 
            
            restartAppendBuf(0, 0);
            restartDelimBuf(false);
            
            //NB: Send <BOF> immediately.  Don't check for a return, because pure BOFs are handled above.
            sendMTok(/*BOF*/ 0);
        }
        
        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_init_region inst_init_region = new CompClass_init_region();
        private final CompClass_layout_inherited_header inst_layout_inherited_header = new CompClass_layout_inherited_header();
        private final CompClass_layout_local_header inst_layout_local_header = new CompClass_layout_local_header();
        private final CompClass_layout_options inst_layout_options = new CompClass_layout_options();
        private final CompClass_layout_rules inst_layout_rules = new CompClass_layout_rules();
        private final CompClass_mpat_directive inst_mpat_directive = new CompClass_mpat_directive();
        private final CompClass_pair_directive inst_pair_directive = new CompClass_pair_directive();
        private final CompClass_string_id_directive inst_string_id_directive = new CompClass_string_id_directive();
        private final CompClass_string inst_string = new CompClass_string();
        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 delimStartLine = -1;
        private int delimStartCol = -1;
        private boolean delimTouched = false;
        private StringBuffer delimBuf = null;
        
        private void restartDelimBuf(boolean copyToAppendBuf) {
            if(copyToAppendBuf && delimTouched) {
                if((delimStartLine < startLine) || (delimStartLine == startLine && delimStartCol < startCol)) {
                    startLine = delimStartLine;
                    startCol = delimStartCol;
                }
                appendBuf.append(delimBuf);
            }
            delimStartLine = -1;
            delimStartCol = -1;
            delimTouched = false;
            delimBuf = new StringBuffer();
        }
        private <T> void appendToStartDelim(T t) {
            if(delimStartLine < 0) {
                delimStartLine = yyline;
                delimStartCol = yycolumn;
            }
            delimBuf.append(t);
            delimTouched = true;
        }
        
        private int startLine = -1;
        private int startCol = -1;
        private StringBuffer appendBuf = null;
        
        private void restartAppendBuf(int startLine, int startCol) {
            this.startLine = startLine;
            this.startCol = startCol;
            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();
            if(yylength() > 0) {
                yypushback(1); //to ensure that at least one char is available
            }
            yybegin(EXTRA_RETURN);
        }
        
        private final MetaLexerClass_layout metalexer_layout = new MetaLexerClass_layout();
        private MetaLexerClass_layout.Transition sendMTok(int mtok) {
            return metalexer_layout.processSymbol(mtok);
        }
        
        public void processMTok(int mtok)  throws Scanner.Exception{
            if(!getCurrFilter().test(mtok)) {
                return; //don't send symbol if it gets filtered out
            }
            Maybe<? extends Symbol> maybeReturn = Maybe.Nothing();
            ComponentInnerClass currComp = getCurrComp();
            boolean appendActionPerformed = false;
            MetaLexerClass_layout.Transition next = sendMTok(mtok);
            while(next != null) {
                boolean endOfEmbedding = next.getEmbeddingNum() < 0;
                if(endOfEmbedding) {
                    endEmbedding();
                } else {
                    //NB: update filter in the OLD embedding and only in start case
                    getCurrFilter().clean(next.getMatch());
                    startEmbedding(next.getEmbeddingNum());
                }
                ComponentInnerClass nextComp = getCurrComp();
                
                int endLine = yyline;
                int endCol = yycolumn - 1; //-1 cancelled 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++;
                }
                
                //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()) {
                    maybeReturn = currComp.performAppendAction(getStartLine(), getStartColumn(), endLine, endCol, getAppendText());
                    appendActionPerformed = true;
                }
                
                if(currComp.isAppend() != nextComp.isAppend()) {
                    int nextStartLine = endLine;
                    int nextStartColumn = endCol + 1;
                    if(prevWasNewline) {
                        nextStartLine++;
                        nextStartColumn = 1;
                    }
                    restartAppendBuf(nextStartLine, nextStartColumn);
                }
                
                restartDelimBuf(nextComp.expectsStartDelim());
                
                next = null;
                if(endOfEmbedding) {
                    int regionSym = currComp.getSymbolValue();
                    if(getCurrFilter().test(regionSym)) {
                        next = sendMTok(regionSym);
                    } else {
                    }
                }
            }
            if(maybeReturn.isJust()) {
                returnExtraValue(maybeReturn.fromJust());
            }
        }
    }
    private static abstract class ComponentInnerClass {
        public boolean isAppend() {
            return false;
        }
        public boolean expectsStartDelim() {
            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 int getSymbolValue();
    }
    //from src/frontend/lexer/shared/base.mlc [1, 1]
    private class CompClass_base extends ComponentInnerClass {
        
        public CompClass_base() {
        }
        
        private static final int YYINITIAL = base_YYINITIAL_STATE; //from src/frontend/lexer/shared/base.mlc [1, 1]
        
        public <T> void appendToStartDelim(T t) {
            state_layout.appendToStartDelim(t);
        }
        
        
        public int getStartState() {
            //from src/frontend/lexer/shared/base.mlc [1, 1]
            return YYINITIAL;
        }
        
        public int getSymbolValue() {
            return 1;
        }
        
        public Maybe<? extends Symbol> base_action_1() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/shared/base.mlc [11, 9]
                error("Unexpected character: " + yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> base_action_2() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/shared/base.mlc [12, 9]
                return Maybe.Just(symbol(EOF));
            }
            return Maybe.Nothing();
        }
    }
    //from src/frontend/lexer/shared/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 src/frontend/lexer/shared/bracket_comment.mlc [1, 1]
        
        public <T> void appendToStartDelim(T t) {
            state_layout.appendToStartDelim(t);
        }
        
        
        public int getStartState() {
            //from src/frontend/lexer/shared/bracket_comment.mlc [1, 1]
            return YYINITIAL;
        }
        
        public int getSymbolValue() {
            return 2;
        }
        
        public Maybe<? extends Symbol> bracket_comment_action_1() throws Scanner.Exception {
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> bracket_comment_action_2() throws Scanner.Exception {
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> bracket_comment_action_3() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/shared/bracket_comment.mlc [15, 9]
                /* ignore */
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> bracket_comment_action_4() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/shared/bracket_comment.mlc [16, 9]
                error("Unterminated bracket comment");
            }
            return Maybe.Nothing();
        }
    }
    //from src/frontend/lexer/shared/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 src/frontend/lexer/shared/decl_region.mlc [1, 1]
        
        public <T> void appendToStartDelim(T t) {
            state_layout.appendToStartDelim(t);
        }
        
        public boolean isAppend() {
            return true;
        }
        public boolean expectsStartDelim() {
            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(DECL_REGION, text, startLine + 1, startCol + 1, endLine + 1, endCol + 1));
            }
            return Maybe.Nothing();
        }
        public <T> void append(T t) {
            state_layout.append(t);
        }
        
        public int getStartState() {
            //from src/frontend/lexer/shared/decl_region.mlc [1, 1]
            return YYINITIAL;
        }
        
        public int getSymbolValue() {
            return 3;
        }
        
        public Maybe<? extends Symbol> decl_region_action_1() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/shared/decl_region.mlc [14, 20]
                append(yytext().substring(1));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> decl_region_action_2() throws Scanner.Exception {
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> decl_region_action_3() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/shared/decl_region.mlc [20, 9]
                append(yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> decl_region_action_4() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/shared/decl_region.mlc [21, 9]
                error("Unterminated declaration region");
            }
            return Maybe.Nothing();
        }
    }
    //from src/frontend/lexer/shared/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 src/frontend/lexer/shared/init_region.mlc [1, 1]
        
        public <T> void appendToStartDelim(T t) {
            state_layout.appendToStartDelim(t);
        }
        
        public boolean isAppend() {
            return true;
        }
        public boolean expectsStartDelim() {
            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(INIT_REGION, text, startLine + 1, startCol + 1, endLine + 1, endCol + 1));
            }
            return Maybe.Nothing();
        }
        public <T> void append(T t) {
            state_layout.append(t);
        }
        
        public int getStartState() {
            //from src/frontend/lexer/shared/init_region.mlc [1, 1]
            return YYINITIAL;
        }
        
        public int getSymbolValue() {
            return 4;
        }
        
        public Maybe<? extends Symbol> init_region_action_1() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/shared/init_region.mlc [14, 20]
                append(yytext().substring(1));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> init_region_action_2() throws Scanner.Exception {
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> init_region_action_3() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/shared/init_region.mlc [20, 9]
                append(yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> init_region_action_4() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/shared/init_region.mlc [21, 9]
                error("Unterminated initialization region");
            }
            return Maybe.Nothing();
        }
    }
    //from src/frontend/lexer/layout/layout_inherited_header.mlc [1, 1]
    private class CompClass_layout_inherited_header extends ComponentInnerClass {
        
        public CompClass_layout_inherited_header() {
        }
        
        private static final int YYINITIAL = layout_inherited_header_YYINITIAL_STATE; //from src/frontend/lexer/layout/layout_inherited_header.mlc [1, 1]
        
        public <T> void appendToStartDelim(T t) {
            state_layout.appendToStartDelim(t);
        }
        
        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 + 1, startCol + 1, endLine + 1, endCol + 1));
            }
            return Maybe.Nothing();
        }
        public <T> void append(T t) {
            state_layout.append(t);
        }
        
        public int getStartState() {
            //from src/frontend/lexer/layout/layout_inherited_header.mlc [1, 1]
            return YYINITIAL;
        }
        
        public int getSymbolValue() {
            return 5;
        }
        
        public Maybe<? extends Symbol> layout_inherited_header_action_1() throws Scanner.Exception {
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_inherited_header_action_2() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_inherited_header.mlc [25, 9]
                append(yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_inherited_header_action_3() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_inherited_header.mlc [26, 9]
                error("Unterminated inherited header section.");
            }
            return Maybe.Nothing();
        }
    }
    //from src/frontend/lexer/layout/layout_local_header.mlc [1, 1]
    private class CompClass_layout_local_header extends ComponentInnerClass {
        
        public CompClass_layout_local_header() {
        }
        
        private static final int YYINITIAL = layout_local_header_YYINITIAL_STATE; //from src/frontend/lexer/layout/layout_local_header.mlc [1, 1]
        
        public <T> void appendToStartDelim(T t) {
            state_layout.appendToStartDelim(t);
        }
        
        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 + 1, startCol + 1, endLine + 1, endCol + 1));
            }
            return Maybe.Nothing();
        }
        public <T> void append(T t) {
            state_layout.append(t);
        }
        
        public int getStartState() {
            //from src/frontend/lexer/layout/layout_local_header.mlc [1, 1]
            return YYINITIAL;
        }
        
        public int getSymbolValue() {
            return 6;
        }
        
        public Maybe<? extends Symbol> layout_local_header_action_1() throws Scanner.Exception {
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_local_header_action_2() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_local_header.mlc [20, 9]
                append(yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_local_header_action_3() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_local_header.mlc [21, 9]
                error("Unterminated local header section.");
            }
            return Maybe.Nothing();
        }
    }
    //from src/frontend/lexer/layout/layout_options.mlc [1, 1]
    private class CompClass_layout_options extends ComponentInnerClass {
        
        public CompClass_layout_options() {
        }
        
        private static final int YYINITIAL = layout_options_YYINITIAL_STATE; //from src/frontend/lexer/layout/layout_options.mlc [1, 1]
        
        public <T> void appendToStartDelim(T t) {
            state_layout.appendToStartDelim(t);
        }
        
        
        public int getStartState() {
            //from src/frontend/lexer/layout/layout_options.mlc [1, 1]
            return YYINITIAL;
        }
        
        public int getSymbolValue() {
            return 7;
        }
        
        public Maybe<? extends Symbol> layout_options_action_1() throws Scanner.Exception {
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_options_action_2() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_options.mlc [12, 18]
                /* ignore */
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_options_action_3() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_options.mlc [13, 19]
                /* ignore */
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_options_action_4() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_options.mlc [15, 18]
                appendToStartDelim(""); /*tweak start pos*/
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_options_action_5() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_options.mlc [16, 18]
                appendToStartDelim(""); /*tweak start pos*/
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_options_action_6() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_options.mlc [19, 34]
                return Maybe.Just(symbol(HELPER_DIRECTIVE));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_options_action_7() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_options.mlc [24, 34]
                return Maybe.Just(symbol(LAYOUT_DIRECTIVE));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_options_action_8() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_options.mlc [27, 33]
                return Maybe.Just(symbol(START_DIRECTIVE));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_options_action_9() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_options.mlc [30, 37]
                return Maybe.Just(symbol(COMPONENT_DIRECTIVE));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_options_action_10() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_options.mlc [35, 35]
                return Maybe.Just(symbol(DECLARE_DIRECTIVE));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_options_action_11() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_options.mlc [38, 37]
                return Maybe.Just(symbol(INITTHROW_DIRECTIVE));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_options_action_12() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_options.mlc [41, 36]
                return Maybe.Just(symbol(LEXTHROW_DIRECTIVE));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_options_action_13() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_options.mlc [46, 34]
                return Maybe.Just(symbol(OPTION_DIRECTIVE));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_options_action_14() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_options.mlc [51, 5]
                error("Invalid directive");
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_options_action_15() throws Scanner.Exception {
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_options_action_16() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/shared/comment_start.mlc [12, 11]
                /* ignore */
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_options_action_17() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_options.mlc [59, 9]
                error("Unexpected character in option section: " + yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_options_action_18() throws Scanner.Exception {
            return Maybe.Nothing();
        }
    }
    //from src/frontend/lexer/layout/layout_rules.mlc [1, 1]
    private class CompClass_layout_rules extends ComponentInnerClass {
        
        public CompClass_layout_rules() {
        }
        
        private static final int YYINITIAL = layout_rules_YYINITIAL_STATE; //from src/frontend/lexer/layout/layout_rules.mlc [1, 1]
        
        public <T> void appendToStartDelim(T t) {
            state_layout.appendToStartDelim(t);
        }
        
        
        public int getStartState() {
            //from src/frontend/lexer/layout/layout_rules.mlc [1, 1]
            return YYINITIAL;
        }
        
        public int getSymbolValue() {
            return 8;
        }
        
        public Maybe<? extends Symbol> layout_rules_action_1() throws Scanner.Exception {
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rules_action_2() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_rules.mlc [12, 18]
                /* ignore */
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rules_action_3() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_rules.mlc [13, 19]
                /* ignore */
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rules_action_4() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_rules.mlc [15, 34]
                return Maybe.Just(symbol(START_EMBED_GROUP));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rules_action_5() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_rules.mlc [19, 32]
                return Maybe.Just(symbol(EMBEDDING_NAME));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rules_action_6() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_rules.mlc [22, 32]
                return Maybe.Just(symbol(EMBEDDING_HOST));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rules_action_7() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_rules.mlc [25, 33]
                return Maybe.Just(symbol(EMBEDDING_GUEST));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rules_action_8() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_rules.mlc [28, 32]
                return Maybe.Just(symbol(EMBEDDING_PAIR));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rules_action_9() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_rules.mlc [32, 33]
                return Maybe.Just(symbol(EMBEDDING_START));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rules_action_10() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_rules.mlc [35, 31]
                return Maybe.Just(symbol(EMBEDDING_END));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rules_action_11() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_rules.mlc [39, 36]
                return Maybe.Just(symbol(START_INHERIT_GROUP));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rules_action_12() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_rules.mlc [42, 35]
                return Maybe.Just(symbol(INHERIT_UNEMBED));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rules_action_13() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_rules.mlc [45, 35]
                return Maybe.Just(symbol(INHERIT_REPLACE));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rules_action_14() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_rules.mlc [48, 36]
                return Maybe.Just(symbol(INHERIT_UNOPTION));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rules_action_15() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/shared/comment_start.mlc [12, 11]
                /* ignore */
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rules_action_16() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/layout_rules.mlc [55, 9]
                error("Unexpected character in rule section: " + yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> layout_rules_action_17() throws Scanner.Exception {
            return Maybe.Nothing();
        }
    }
    //from src/frontend/lexer/layout/mpat_directive.mlc [1, 1]
    private class CompClass_mpat_directive extends ComponentInnerClass {
        
        public CompClass_mpat_directive() {
        }
        
        private static final int YYINITIAL = mpat_directive_YYINITIAL_STATE; //from src/frontend/lexer/layout/mpat_directive.mlc [1, 1]
        
        public <T> void appendToStartDelim(T t) {
            state_layout.appendToStartDelim(t);
        }
        
        
        public int getStartState() {
            //from src/frontend/lexer/layout/mpat_directive.mlc [1, 1]
            return YYINITIAL;
        }
        
        public int getSymbolValue() {
            return 9;
        }
        
        public Maybe<? extends Symbol> mpat_directive_action_1() throws Scanner.Exception {
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> mpat_directive_action_2() throws Scanner.Exception {
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> mpat_directive_action_3() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/mpat_directive.mlc [14, 19]
                /* ignore */
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> mpat_directive_action_4() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/mpat_directive.mlc [16, 9]
                return Maybe.Just(symbol(MP_ANY));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> mpat_directive_action_5() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/mpat_directive.mlc [17, 9]
                return Maybe.Just(symbol(MP_BOF));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> mpat_directive_action_6() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/mpat_directive.mlc [18, 5]
                return Maybe.Just(symbol(MP_LPAREN));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> mpat_directive_action_7() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/mpat_directive.mlc [19, 5]
                return Maybe.Just(symbol(MP_RPAREN));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> mpat_directive_action_8() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/mpat_directive.mlc [20, 5]
                return Maybe.Just(symbol(MP_LSQUARE));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> mpat_directive_action_9() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/mpat_directive.mlc [21, 5]
                return Maybe.Just(symbol(MP_RSQUARE));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> mpat_directive_action_10() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/mpat_directive.mlc [22, 5]
                return Maybe.Just(symbol(MP_CARET));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> mpat_directive_action_11() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/mpat_directive.mlc [23, 5]
                return Maybe.Just(symbol(MP_STAR));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> mpat_directive_action_12() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/mpat_directive.mlc [24, 5]
                return Maybe.Just(symbol(MP_PLUS));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> mpat_directive_action_13() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/mpat_directive.mlc [25, 5]
                return Maybe.Just(symbol(MP_OPT));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> mpat_directive_action_14() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/mpat_directive.mlc [26, 5]
                return Maybe.Just(symbol(MP_OR));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> mpat_directive_action_15() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/shared/comment_start.mlc [12, 11]
                /* ignore */
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> mpat_directive_action_16() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/mpat_directive.mlc [30, 20]
                return Maybe.Just(symbol(MP_REGION, yytext().substring(1, yylength() - 1)));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> mpat_directive_action_17() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/mpat_directive.mlc [31, 29]
                return Maybe.Just(symbol(MP_REGION, yytext().substring(1, yylength() - 1)));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> mpat_directive_action_18() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/mpat_directive.mlc [32, 14]
                return Maybe.Just(symbol(MP_SYM, yytext()));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> mpat_directive_action_19() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/mpat_directive.mlc [37, 9]
                error("Unexpected character in meta-pattern: " + yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> mpat_directive_action_20() throws Scanner.Exception {
            return Maybe.Nothing();
        }
    }
    //from src/frontend/lexer/layout/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 src/frontend/lexer/layout/pair_directive.mlc [1, 1]
        
        public <T> void appendToStartDelim(T t) {
            state_layout.appendToStartDelim(t);
        }
        
        
        public int getStartState() {
            //from src/frontend/lexer/layout/pair_directive.mlc [1, 1]
            return YYINITIAL;
        }
        
        public int getSymbolValue() {
            return 10;
        }
        
        public Maybe<? extends Symbol> pair_directive_action_1() throws Scanner.Exception {
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> pair_directive_action_2() throws Scanner.Exception {
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> pair_directive_action_3() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/pair_directive.mlc [14, 19]
                /* ignore */
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> pair_directive_action_4() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/pair_directive.mlc [16, 3]
                return Maybe.Just(symbol(COMMA));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> pair_directive_action_5() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/shared/comment_start.mlc [12, 11]
                /* ignore */
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> pair_directive_action_6() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/pair_directive.mlc [20, 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 {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/pair_directive.mlc [21, 29]
                return Maybe.Just(symbol(MP_REGION, yytext().substring(1, yylength() - 1)));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> pair_directive_action_8() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/pair_directive.mlc [22, 14]
                return Maybe.Just(symbol(MP_SYM, yytext()));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> pair_directive_action_9() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/layout/pair_directive.mlc [27, 9]
                error("Unexpected character in pair element: " + yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> pair_directive_action_10() throws Scanner.Exception {
            return Maybe.Nothing();
        }
    }
    //from src/frontend/lexer/shared/string_id_directive.mlc [1, 1]
    private class CompClass_string_id_directive extends ComponentInnerClass {
        
        public CompClass_string_id_directive() {
        }
        
        private static final int YYINITIAL = string_id_directive_YYINITIAL_STATE; //from src/frontend/lexer/shared/string_id_directive.mlc [1, 1]
        
        public <T> void appendToStartDelim(T t) {
            state_layout.appendToStartDelim(t);
        }
        
        
        public int getStartState() {
            //from src/frontend/lexer/shared/string_id_directive.mlc [1, 1]
            return YYINITIAL;
        }
        
        public int getSymbolValue() {
            return 11;
        }
        
        public Maybe<? extends Symbol> string_id_directive_action_1() throws Scanner.Exception {
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_id_directive_action_2() throws Scanner.Exception {
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_id_directive_action_3() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/shared/string_id_directive.mlc [14, 19]
                /* ignore */
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_id_directive_action_4() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/shared/string_id_directive.mlc [17, 9]
                appendToStartDelim(""); /*tweak start pos*/
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_id_directive_action_5() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/shared/string_id_directive.mlc [19, 3]
                return Maybe.Just(symbol(COMMA));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_id_directive_action_6() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/shared/comment_start.mlc [12, 11]
                /* ignore */
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_id_directive_action_7() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/shared/string_id_directive.mlc [24, 14]
                return Maybe.Just(symbol(IDENTIFIER, yytext()));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_id_directive_action_8() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/shared/string_id_directive.mlc [25, 23]
                return Maybe.Just(symbol(QUALIFIED_IDENTIFIER, yytext()));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_id_directive_action_9() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/shared/string_id_directive.mlc [29, 9]
                error("Unexpected character in string/identifier directive: " + yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_id_directive_action_10() throws Scanner.Exception {
            return Maybe.Nothing();
        }
    }
    //from src/frontend/lexer/shared/string.mlc [1, 1]
    private class CompClass_string extends ComponentInnerClass {
        
        public CompClass_string() {
        }
        
        private static final int YYINITIAL = string_YYINITIAL_STATE; //from src/frontend/lexer/shared/string.mlc [1, 1]
        
        public <T> void appendToStartDelim(T t) {
            state_layout.appendToStartDelim(t);
        }
        
        public boolean isAppend() {
            return true;
        }
        public boolean expectsStartDelim() {
            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(STRING, text, startLine + 1, startCol + 1, endLine + 1, endCol + 1));
            }
            return Maybe.Nothing();
        }
        public <T> void append(T t) {
            state_layout.append(t);
        }
        
        public int getStartState() {
            //from src/frontend/lexer/shared/string.mlc [1, 1]
            return YYINITIAL;
        }
        
        public int getSymbolValue() {
            return 12;
        }
        
        public Maybe<? extends Symbol> string_action_1() throws Scanner.Exception {
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_action_2() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/shared/string.mlc [15, 18]
                append(yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_action_3() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/shared/string.mlc [16, 9]
                append(yytext().substring(1));
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_action_4() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/shared/string.mlc [17, 4]
                error("Incomplete escape sequence");
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_action_5() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/shared/string.mlc [19, 18]
                error("Unterminated string literal");
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_action_6() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/shared/string.mlc [24, 9]
                append(yytext());
            }
            return Maybe.Nothing();
        }
        public Maybe<? extends Symbol> string_action_7() throws Scanner.Exception {
            if(Object.class != null) {
                //from src/frontend/lexer/shared/string.mlc [25, 9]
                error("Unterminated string literal");
            }
            return Maybe.Nothing();
        }
    }
    public static class MetaLexerClass_layout {
        
        //// Symbols ////
        // <BOF>
        // %base%
        // %bracket_comment%
        // %decl_region%
        // %init_region%
        // %layout_inherited_header%
        // %layout_local_header%
        // %layout_options%
        // %layout_rules%
        // %mpat_directive%
        // %pair_directive%
        // %string_id_directive%
        // %string%
        // START_BRACKET_COMMENT
        // END_BRACKET_COMMENT
        // EOF_ERROR
        // END_DECL_REGION
        // END_INIT_REGION
        // END_INHERITED_HEADER
        // END_LOCAL_HEADER
        // START_DECL_REGION
        // START_INIT_REGION
        // START_STRING_ID_DIRECTIVE
        // END_OPTION_SECTION
        // START_PAIR_DIRECTIVE
        // START_MPAT_DIRECTIVE
        // END_RULES_SECTION
        // END_MPAT_DIRECTIVE
        // END_PAIR_DIRECTIVE
        // END_STRING_ID_DIRECTIVE
        // START_STRING
        // END_STRING
        
        private static final Integer[][] trans_BASE = new Integer[][] {
            {0,0,0,0,0,1,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},
        };
        private static final Integer[] act_BASE = new Integer[] {null,1,0,2,};
        
        private static final Integer[][] trans_eof_error = new Integer[][] {
            {0,1,1,1,1,2,3,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,},
        };
        private static final Integer[] act_eof_error = new Integer[] {null,22,1,0,2,};
        
        private static final Integer[][] trans_mpat_directive = new Integer[][] {
            {0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,},
        };
        private static final Integer[] act_mpat_directive = new Integer[] {null,3,20,};
        
        private static final Integer[][] trans_bracket_comments = new Integer[][] {
            {0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},
        };
        private static final Integer[] act_bracket_comments = new Integer[] {null,3,15,7,};
        
        private static final Integer[][] trans_rules_section = new Integer[][] {
            {0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,2,0,3,4,5,0,0,0,0,0,},
        };
        private static final Integer[] act_rules_section = new Integer[] {null,3,6,8,9,14,};
        
        private static final Integer[][] trans_pair_directive = new Integer[][] {
            {0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,},
        };
        private static final Integer[] act_pair_directive = new Integer[] {null,3,19,};
        
        private static final Integer[][] trans_options_section = new Integer[][] {
            {0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,2,3,4,5,0,0,0,0,0,0,0,0,},
        };
        private static final Integer[] act_options_section = new Integer[] {null,3,5,4,6,13,};
        
        private static final Integer[][] trans_string = new Integer[][] {
            {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,},
        };
        private static final Integer[] act_string = new Integer[] {null,7,21,};
        
        private static final Integer[][] trans_inherited_header = new Integer[][] {
            {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,},
        };
        private static final Integer[] act_inherited_header = new Integer[] {null,7,12,};
        
        private static final Integer[][] trans_local_header = new Integer[][] {
            {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,},
        };
        private static final Integer[] act_local_header = new Integer[] {null,7,11,};
        
        private static final Integer[][] trans_string_id_directive = new Integer[][] {
            {0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,0,},
        };
        private static final Integer[] act_string_id_directive = new Integer[] {null,3,18,10,};
        
        private static final Integer[][] trans_init_region = new Integer[][] {
            {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},
        };
        private static final Integer[] act_init_region = new Integer[] {null,7,16,};
        
        private static final Integer[][] trans_decl_region = new Integer[][] {
            {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},
        };
        private static final Integer[] act_decl_region = new Integer[] {null,7,17,};
        
        private static final Integer[][][] transitionTables = new Integer[][][] {
            trans_local_header,
            trans_inherited_header,
            trans_options_section,
            trans_rules_section,
            trans_bracket_comments,
            trans_init_region,
            trans_decl_region,
            trans_string_id_directive,
            trans_pair_directive,
            trans_mpat_directive,
            trans_string,
            trans_eof_error,
        };
        
        private static final Integer[][] actionTables = new Integer[][] {
            act_local_header,
            act_inherited_header,
            act_options_section,
            act_rules_section,
            act_bracket_comments,
            act_init_region,
            act_decl_region,
            act_string_id_directive,
            act_pair_directive,
            act_mpat_directive,
            act_string,
            act_eof_error,
        };
        
        private static final Integer[][] rev_trans_inherited_header = new Integer[][] {
            {1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,},
            {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,},
        };
        private static final Integer[] rev_act_inherited_header = new Integer[] {null,null,1,};
        
        private static final Integer[][] rev_trans_options_section = new Integer[][] {
            {1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,},
            {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,},
        };
        private static final Integer[] rev_act_options_section = new Integer[] {null,null,1,};
        
        private static final Integer[][] rev_trans_rules_section = new Integer[][] {
            {1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,},
            {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,},
        };
        private static final Integer[] rev_act_rules_section = new Integer[] {null,null,1,};
        
        private static final Integer[][] rev_trans_bracket_comments = new Integer[][] {
            {1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,},
            {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,},
        };
        private static final Integer[] rev_act_bracket_comments = new Integer[] {null,null,1,};
        
        private static final Integer[][] rev_trans_init_region = new Integer[][] {
            {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,},
            {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,},
        };
        private static final Integer[] rev_act_init_region = new Integer[] {null,null,1,};
        
        private static final Integer[][] rev_trans_decl_region = new Integer[][] {
            {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,},
            {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,},
        };
        private static final Integer[] rev_act_decl_region = new Integer[] {null,null,1,};
        
        private static final Integer[][] rev_trans_string_id_directive = new Integer[][] {
            {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,},
            {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,},
        };
        private static final Integer[] rev_act_string_id_directive = new Integer[] {null,null,1,};
        
        private static final Integer[][] rev_trans_pair_directive = new Integer[][] {
            {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,},
            {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,},
        };
        private static final Integer[] rev_act_pair_directive = new Integer[] {null,null,1,};
        
        private static final Integer[][] rev_trans_mpat_directive = new Integer[][] {
            {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,},
            {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,},
        };
        private static final Integer[] rev_act_mpat_directive = new Integer[] {null,null,1,};
        
        private static final Integer[][] rev_trans_string = new Integer[][] {
            {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,},
            {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,},
        };
        private static final Integer[] rev_act_string = new Integer[] {null,null,1,};
        
        private static final Integer[][] rev_trans_eof_error = new Integer[][] {
            {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,},
            {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,},
        };
        private static final Integer[] rev_act_eof_error = new Integer[] {null,null,1,};
        
        private static final Integer[][][] reverseTransitionTables = new Integer[][][] {
            rev_trans_inherited_header,
            rev_trans_options_section,
            rev_trans_rules_section,
            rev_trans_bracket_comments,
            rev_trans_init_region,
            rev_trans_decl_region,
            rev_trans_string_id_directive,
            rev_trans_eof_error,
            rev_trans_pair_directive,
            rev_trans_mpat_directive,
            rev_trans_string,
        };
        
        private static final Integer[][] reverseActionTables = new Integer[][] {
            rev_act_inherited_header,
            rev_act_options_section,
            rev_act_rules_section,
            rev_act_bracket_comments,
            rev_act_init_region,
            rev_act_decl_region,
            rev_act_string_id_directive,
            rev_act_eof_error,
            rev_act_pair_directive,
            rev_act_mpat_directive,
            rev_act_string,
        };
        
        private static final int[] actionMap = new int[] {1,2,3,4,5,6,7,11,8,9,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,};
        
        private final java.util.Stack<Integer> stateStack = new java.util.Stack<Integer>();
        
        private java.util.List<Integer> currentMatch = new java.util.ArrayList<Integer>();
        private int currentState = 0;
        private Integer[][] currentTransitionTable = trans_BASE;
        private Integer[] currentActionTable = act_BASE;
        
        public MetaLexerClass_layout() {
            //Transition through states reachable by pure BOF patterns
            switchDFAs(/*local_header*/ 0); 
        }
        
        public Transition processSymbol(int sym) {
            currentMatch.add(sym);
            currentState = currentTransitionTable[currentState][sym];
            Integer mpatNum = currentActionTable[currentState];
            if(mpatNum == null) {
                return null;
            }
            int action = actionMap[mpatNum];
            Transition transition = new Transition(action, cleanMatch(mpatNum, currentMatch));
            switchDFAs(action);
            return transition;
        }
        
        private void switchDFAs(int action) {
            currentState = 0;
            currentMatch.clear();
            
            int nextEmbedding;
            if(action < 0) {
                stateStack.pop();
                nextEmbedding = stateStack.isEmpty() ? -1 : stateStack.peek();
            } else {
                stateStack.push(action);
                nextEmbedding = action;
            }
            
            if(nextEmbedding < 0) {
                currentTransitionTable = trans_BASE;
                currentActionTable = act_BASE;
            } else {
                currentTransitionTable = transitionTables[nextEmbedding];
                currentActionTable = actionTables[nextEmbedding];
            }
        }
        
        private java.util.List<Integer> cleanMatch(int mpatNum, java.util.List<Integer> rawMatch) {
            if(mpatNum >= reverseTransitionTables.length) {
                //don't need to clean end pattern matches - they aren't looked at
                return new java.util.ArrayList<Integer>(rawMatch);
            }
            
            java.util.List<Integer> cleanMatch = new java.util.ArrayList<Integer>();
            Integer[][] transitions = reverseTransitionTables[mpatNum];
            Integer[] actions = reverseActionTables[mpatNum];
            int dfaState = 0;
            for(int i = rawMatch.size() - 1; (i >= 0) && (actions[dfaState] == null); i--) {
                int sym = rawMatch.get(i);
                cleanMatch.add(sym);
                dfaState = transitions[dfaState][sym];
            }
            java.util.Collections.reverse(cleanMatch);
            return cleanMatch;
        }
        
        public static class Transition {
            private final int embeddingNum;
            private final java.util.List<Integer> match;
            
            public Transition(int embeddingNum, java.util.List<Integer> match) {
                this.embeddingNum = embeddingNum;
                this.match = new java.util.ArrayList<Integer>(match);
            }
            
            public int getEmbeddingNum() { return embeddingNum; }
            
            public java.util.List<Integer> getMatch() { return match; }
        }
        
    }
    private static class PairFilter {
        public static final PairFilter EMPTY = new PairFilter.Builder().build();
        
        private final java.util.Map<Integer, java.util.Set<Integer>> pairMap; //close -> open
        private final java.util.Set<Integer> allOpenSymbols;
        private final java.util.List<Integer> unclosedOpenSymbols; //really a stack, but then the iterator would go backwards
        
        private PairFilter(java.util.Map<Integer, java.util.Set<Integer>> pairMap, java.util.Set<Integer> allOpenSymbols) {
            this.pairMap = pairMap;
            this.allOpenSymbols = allOpenSymbols;
            this.unclosedOpenSymbols = new java.util.ArrayList<Integer>();
        }
        
        public static class Builder {
            private final java.util.Map<Integer, java.util.Set<Integer>> pairMap; //close -> open
            private final java.util.Set<Integer> allOpenSymbols;
            
            public Builder() {
                this.pairMap = new java.util.HashMap<Integer, java.util.Set<Integer>>();
                this.allOpenSymbols = new java.util.HashSet<Integer>();
            }
            
            public Builder add(int open, int close) {
                allOpenSymbols.add(open);
                java.util.Set<Integer> list = pairMap.get(close);
                if(list == null) {
                    list = new java.util.HashSet<Integer>();
                    pairMap.put(close, list);
                }
                list.add(open);
                return this;
            }
            
            public PairFilter build() {
                return new PairFilter(pairMap, allOpenSymbols);
            }
        }
        
        public boolean test(int sym) {
            //NB: closing-ness takes precedence over opening-ness
            java.util.Set<Integer> correspondingOpens = pairMap.get(sym);
            if(correspondingOpens != null) { //implies closing
                for(java.util.Iterator<Integer> it = unclosedOpenSymbols.iterator(); it.hasNext(); ) {
                    int 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(allOpenSymbols.contains(sym)) { //implies opening
                unclosedOpenSymbols.add(0, sym); //insert at beginning
            }
            return true;
        }
        
        public void clean(java.util.List<Integer> match) {
            java.util.Collections.reverse(match);
            for(int sym : match) {
                if(unclosedOpenSymbols.isEmpty()) {
                    return;
                }
                
                if(unclosedOpenSymbols.get(0) == sym) {
                    unclosedOpenSymbols.remove(0);
                }
            }
        }
        
        public void reset() {
            unclosedOpenSymbols.clear();
        }
    }
    public class EmbeddingRecord {
        private final String name;
        private final ComponentInnerClass comp;
        private final PairFilter filter;
        
        public EmbeddingRecord(String name, ComponentInnerClass comp, PairFilter filter) {
            this.name = name;
            this.comp = comp;
            this.filter = filter;
        }
        
        public String getName() {
            return name;
        }
        
        public ComponentInnerClass getComp() {
            return comp;
        }
        
        public PairFilter getFilter() {
            return filter;
        }
    }
    private static abstract class Maybe<T> {
        @SuppressWarnings("unchecked")
        private final static Maybe NOTHING = new Nothing();
        
        private Maybe() {}
        
        public final boolean isNothing() {
            return !isJust();
        }
        public abstract boolean isJust();
        
        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 isJust() {
                return true;
            }
            
            public T fromJust() {
                return value;
            }
            
            public String toString() { 
                return "Just " + value;
            }
        }
        
        private static class Nothing<T> extends Maybe<T> {
            private Nothing() {}
            
            public boolean isJust() {
                return false;
            }
            
            public T fromJust() {
                throw new UnsupportedOperationException("Cannot extract value from Nothing");
            }
            
            public String toString() {
                return "Nothing";
            }
        }
    }


  /**
   * 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 62: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_decl_region.decl_region_action_1();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 92: break;
        case 79: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_init_region.init_region_action_1();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 93: break;
        case 55: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_mpat_directive.mpat_directive_action_1();
        } finally {
            state_layout.processMTok(13); //START_BRACKET_COMMENT
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 94: break;
        case 40: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_string.string_action_5();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 95: break;
        case 24: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_mpat_directive.mpat_directive_action_10();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 96: break;
        case 19: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_mpat_directive.mpat_directive_action_3();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 97: break;
        case 38: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_string_id_directive.string_id_directive_action_5();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 98: break;
        case 74: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_init_region.init_region_action_2();
        } finally {
            state_layout.processMTok(17); //END_INIT_REGION
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 99: break;
        case 30: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_pair_directive.pair_directive_action_2();
        } finally {
            state_layout.processMTok(28); //END_PAIR_DIRECTIVE
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 100: break;
        case 39: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_string.string_action_6();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 101: break;
        case 16: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_mpat_directive.mpat_directive_action_11();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 102: break;
        case 41: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_string.string_action_1();
        } finally {
            state_layout.processMTok(31); //END_STRING
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 103: break;
        case 75: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_options.layout_options_action_5();
        } finally {
            state_layout.processMTok(21); //START_INIT_REGION
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 104: break;
        case 71: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_mpat_directive.mpat_directive_action_4();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 105: break;
        case 31: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_pair_directive.pair_directive_action_3();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 106: break;
        case 57: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_pair_directive.pair_directive_action_1();
        } finally {
            state_layout.processMTok(13); //START_BRACKET_COMMENT
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 107: break;
        case 82: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_options.layout_options_action_13();
        } finally {
            state_layout.processMTok(22); //START_STRING_ID_DIRECTIVE
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 108: break;
        case 77: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_rules.layout_rules_action_9();
        } finally {
            state_layout.processMTok(25); //START_MPAT_DIRECTIVE
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 109: break;
        case 58: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_string_id_directive.string_id_directive_action_6();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 110: break;
        case 7: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_local_header.layout_local_header_action_2();
        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 5: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_init_region.init_region_action_3();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 113: break;
        case 78: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_rules.layout_rules_action_7();
        } finally {
            state_layout.processMTok(22); //START_STRING_ID_DIRECTIVE
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 114: break;
        case 89: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_rules.layout_rules_action_14();
        } finally {
            state_layout.processMTok(22); //START_STRING_ID_DIRECTIVE
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 115: break;
        case 25: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_mpat_directive.mpat_directive_action_12();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 116: break;
        case 72: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_mpat_directive.mpat_directive_action_5();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 117: break;
        case 32: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_pair_directive.pair_directive_action_4();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 118: break;
        case 34: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_string_id_directive.string_id_directive_action_7();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 119: break;
        case 87: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_options.layout_options_action_12();
        } finally {
            state_layout.processMTok(22); //START_STRING_ID_DIRECTIVE
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 120: break;
        case 68: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_rules.layout_rules_action_6();
        } finally {
            state_layout.processMTok(22); //START_STRING_ID_DIRECTIVE
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 121: break;
        case 26: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_mpat_directive.mpat_directive_action_13();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 122: break;
        case 52: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_rules.layout_rules_action_15();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 123: break;
        case 85: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_rules.layout_rules_action_13();
        } finally {
            state_layout.processMTok(22); //START_STRING_ID_DIRECTIVE
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 124: break;
        case 20: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_mpat_directive.mpat_directive_action_6();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 125: break;
        case 56: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_pair_directive.pair_directive_action_5();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 126: break;
        case 65: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_string_id_directive.string_id_directive_action_8();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 127: break;
        case 46: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_inherited_header.layout_inherited_header_action_1();
        } finally {
            state_layout.processMTok(18); //END_INHERITED_HEADER
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 128: break;
        case 90: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_options.layout_options_action_11();
        } finally {
            state_layout.processMTok(22); //START_STRING_ID_DIRECTIVE
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 129: break;
        case 27: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_mpat_directive.mpat_directive_action_14();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 130: break;
        case 12: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_rules.layout_rules_action_16();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 131: break;
        case 67: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_rules.layout_rules_action_5();
        } finally {
            state_layout.processMTok(22); //START_STRING_ID_DIRECTIVE
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 132: break;
        case 21: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_mpat_directive.mpat_directive_action_7();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 133: break;
        case 64: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_pair_directive.pair_directive_action_6();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 134: break;
        case 33: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_string_id_directive.string_id_directive_action_9();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 135: break;
        case 1: 
          { yybegin(state_layout.getPrevState());
        return state_layout.getExtraReturn();
          }
        case 136: break;
        case 3: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_bracket_comment.bracket_comment_action_3();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 137: break;
        case 86: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_rules.layout_rules_action_12();
        } finally {
            state_layout.processMTok(22); //START_STRING_ID_DIRECTIVE
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 138: break;
        case 13: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_rules.layout_rules_action_2();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 139: break;
        case 91: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_options.layout_options_action_9();
        } finally {
            state_layout.processMTok(22); //START_STRING_ID_DIRECTIVE
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 140: break;
        case 6: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_inherited_header.layout_inherited_header_action_2();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 141: break;
        case 54: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_mpat_directive.mpat_directive_action_15();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 142: break;
        case 73: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_pair_directive.pair_directive_action_7();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 143: break;
        case 22: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_mpat_directive.mpat_directive_action_8();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 144: break;
        case 9: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_options.layout_options_action_14();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 145: break;
        case 14: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_rules.layout_rules_action_3();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 146: break;
        case 88: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_rules.layout_rules_action_11();
        } finally {
            state_layout.processMTok(22); //START_STRING_ID_DIRECTIVE
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 147: break;
        case 44: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_bracket_comment.bracket_comment_action_2();
        } finally {
            state_layout.processMTok(14); //END_BRACKET_COMMENT
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 148: break;
        case 45: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_decl_region.decl_region_action_2();
        } finally {
            state_layout.processMTok(16); //END_DECL_REGION
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 149: break;
        case 76: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_options.layout_options_action_8();
        } finally {
            state_layout.processMTok(22); //START_STRING_ID_DIRECTIVE
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 150: break;
        case 63: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_mpat_directive.mpat_directive_action_16();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 151: break;
        case 23: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_mpat_directive.mpat_directive_action_9();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 152: break;
        case 29: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_pair_directive.pair_directive_action_8();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 153: break;
        case 84: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_options.layout_options_action_10();
        } finally {
            state_layout.processMTok(22); //START_STRING_ID_DIRECTIVE
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 154: break;
        case 37: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_string_id_directive.string_id_directive_action_4();
        } finally {
            state_layout.processMTok(30); //START_STRING
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 155: break;
        case 83: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_rules.layout_rules_action_4();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 156: break;
        case 59: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_string_id_directive.string_id_directive_action_1();
        } finally {
            state_layout.processMTok(13); //START_BRACKET_COMMENT
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 157: break;
        case 10: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_options.layout_options_action_2();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 158: break;
        case 70: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_mpat_directive.mpat_directive_action_17();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 159: break;
        case 43: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_bracket_comment.bracket_comment_action_1();
        } finally {
            state_layout.processMTok(13); //START_BRACKET_COMMENT
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 160: break;
        case 28: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_pair_directive.pair_directive_action_9();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 161: break;
        case 48: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_options.layout_options_action_16();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 162: break;
        case 81: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_options.layout_options_action_7();
        } finally {
            state_layout.processMTok(22); //START_STRING_ID_DIRECTIVE
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 163: break;
        case 53: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_rules.layout_rules_action_1();
        } finally {
            state_layout.processMTok(13); //START_BRACKET_COMMENT
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 164: break;
        case 11: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_options.layout_options_action_3();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 165: break;
        case 17: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_mpat_directive.mpat_directive_action_18();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 166: break;
        case 50: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_options.layout_options_action_15();
        } finally {
            state_layout.processMTok(23); //END_OPTION_SECTION
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 167: break;
        case 8: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_layout_options.layout_options_action_17();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 168: break;
        case 61: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_string.string_action_2();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 169: break;
        case 49: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_options.layout_options_action_1();
        } finally {
            state_layout.processMTok(13); //START_BRACKET_COMMENT
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 170: break;
        case 47: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_local_header.layout_local_header_action_1();
        } finally {
            state_layout.processMTok(19); //END_LOCAL_HEADER
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 171: break;
        case 2: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_base.base_action_1();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 172: break;
        case 80: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_options.layout_options_action_6();
        } finally {
            state_layout.processMTok(22); //START_STRING_ID_DIRECTIVE
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 173: break;
        case 51: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_options.layout_options_action_4();
        } finally {
            state_layout.processMTok(20); //START_DECL_REGION
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 174: break;
        case 69: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_rules.layout_rules_action_8();
        } finally {
            state_layout.processMTok(24); //START_PAIR_DIRECTIVE
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 175: break;
        case 15: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_mpat_directive.mpat_directive_action_19();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 176: break;
        case 60: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_string.string_action_3();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 177: break;
        case 18: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_mpat_directive.mpat_directive_action_2();
        } finally {
            state_layout.processMTok(27); //END_MPAT_DIRECTIVE
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 178: break;
        case 36: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_string_id_directive.string_id_directive_action_3();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 179: break;
        case 35: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_string_id_directive.string_id_directive_action_2();
        } finally {
            state_layout.processMTok(29); //END_STRING_ID_DIRECTIVE
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 180: break;
        case 42: 
          { Maybe<? extends Symbol> maybeResult = state_layout.inst_string.string_action_4();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 181: break;
        case 66: 
          { Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_rules.layout_rules_action_10();
        } finally {
            state_layout.processMTok(25); //START_MPAT_DIRECTIVE
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
          }
        case 182: break;
        default: 
          if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
            zzAtEOF = true;
            switch (zzLexicalState) {
            case base_YYINITIAL_STATE: {
              Maybe<? extends Symbol> maybeResult = state_layout.inst_base.base_action_2();
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
            }
            case 290: break;
            case mpat_directive_YYINITIAL_STATE: {
              Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_mpat_directive.mpat_directive_action_20();
        } finally {
            state_layout.processMTok(27); //END_MPAT_DIRECTIVE
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
            }
            case 291: break;
            case string_id_directive_YYINITIAL_STATE: {
              Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_string_id_directive.string_id_directive_action_10();
        } finally {
            state_layout.processMTok(29); //END_STRING_ID_DIRECTIVE
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
            }
            case 292: break;
            case decl_region_YYINITIAL_STATE: {
              Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_decl_region.decl_region_action_4();
        } finally {
            state_layout.processMTok(15); //EOF_ERROR
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
            }
            case 293: break;
            case EXTRA_RETURN: {
              yybegin(state_layout.getPrevState());
        return state_layout.getExtraReturn();
            }
            case 294: break;
            case layout_local_header_YYINITIAL_STATE: {
              Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_local_header.layout_local_header_action_3();
        } finally {
            state_layout.processMTok(15); //EOF_ERROR
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
            }
            case 295: break;
            case string_YYINITIAL_STATE: {
              Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_string.string_action_7();
        } finally {
            state_layout.processMTok(15); //EOF_ERROR
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
            }
            case 296: break;
            case layout_rules_YYINITIAL_STATE: {
              Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_rules.layout_rules_action_17();
        } finally {
            state_layout.processMTok(26); //END_RULES_SECTION
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
            }
            case 297: break;
            case bracket_comment_YYINITIAL_STATE: {
              Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_bracket_comment.bracket_comment_action_4();
        } finally {
            state_layout.processMTok(15); //EOF_ERROR
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
            }
            case 298: break;
            case init_region_YYINITIAL_STATE: {
              Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_init_region.init_region_action_4();
        } finally {
            state_layout.processMTok(15); //EOF_ERROR
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
            }
            case 299: break;
            case layout_inherited_header_YYINITIAL_STATE: {
              Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_inherited_header.layout_inherited_header_action_3();
        } finally {
            state_layout.processMTok(15); //EOF_ERROR
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
            }
            case 300: break;
            case layout_options_YYINITIAL_STATE: {
              Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_layout_options.layout_options_action_18();
        } finally {
            state_layout.processMTok(23); //END_OPTION_SECTION
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
            }
            case 301: break;
            case pair_directive_YYINITIAL_STATE: {
              Maybe<? extends Symbol> maybeResult;
        try {
            maybeResult = state_layout.inst_pair_directive.pair_directive_action_10();
        } finally {
            state_layout.processMTok(28); //END_PAIR_DIRECTIVE
        }
        if(maybeResult.isJust()) {
            return maybeResult.fromJust();
        }
            }
            case 302: break;
            default:
            return null;
            }
          } 
          else {
            zzScanError(ZZ_NO_MATCH);
          }
      }
    }
  }


}
