Package gherkin.lexer

Source Code of gherkin.lexer.Ca

// line 1 "ragel/i18n/ca.java.rl"
package gherkin.lexer;

import java.io.UnsupportedEncodingException;
import java.util.List;
import java.util.ArrayList;
import java.util.regex.Pattern;
import gherkin.lexer.Lexer;
import gherkin.lexer.Listener;
import gherkin.lexer.LexingError;

public class Ca implements Lexer {
 
// line 150 "ragel/i18n/ca.java.rl"


  private final Listener listener;

  public Ca(Listener listener) {
    this.listener = listener;
  }

 
// line 26 "java/src/main/java/gherkin/lexer/Ca.java"
private static byte[] init__lexer_actions_0()
{
  return new byte [] {
      0,    1,    0,    1,    1,    1,    2,    1,    3,    1,    4,    1,
      5,    1,    6,    1,    7,    1,    8,    1,    9,    1,   10,    1,
     11,    1,   12,    1,   13,    1,   16,    1,   17,    1,   18,    1,
     19,    1,   20,    1,   21,    1,   22,    1,   23,    2,    2,   18,
      2,    3,    4,    2,   13,    0,    2,   14,   15,    2,   17,    0,
      2,   17,    1,    2,   17,   16,    2,   17,   19,    2,   18,    6,
      2,   18,    7,    2,   18,    8,    2,   18,    9,    2,   18,   10,
      2,   18,   16,    2,   20,   21,    2,   22,    0,    2,   22,    1,
      2,   22,   16,    2,   22,   19,    3,    4,   14,   15,    3,    5,
     14,   15,    3,   11,   14,   15,    3,   12,   14,   15,    3,   13,
     14,   15,    3,   14,   15,   18,    3,   17,    0,   11,    3,   17,
     14,   15,    4,    2,   14,   15,   18,    4,    3,    4,   14,   15,
      4,   17,    0,   14,   15,    5,   17,    0,   11,   14,   15
  };
}

private static final byte _lexer_actions[] = init__lexer_actions_0();


private static short[] init__lexer_key_offsets_0()
{
  return new short [] {
      0,    0,   20,   21,   22,   41,   42,   43,   45,   47,   52,   57,
     62,   67,   71,   75,   77,   78,   79,   80,   81,   82,   83,   84,
     85,   86,   87,   88,   89,   90,   91,   92,   93,   95,   97102,
    109114117118119120121122123124125126,
    127128129130131132133134135136152154,
    156158160162164166168170172174176178,
    180182201202204205206207208209210211,
    212213214215216217218219231233235237,
    239241243245247249251253255257259261,
    263265267269271273275277279281283285,
    287289291293295297299301303305307309,
    312315317319321323325327329331333335,
    337339341343345347349351353355357359,
    361363365367369371373375377379381383,
    385387389391393395397398399400402403,
    405407408409410411412413414415432434,
    436438440442444446448450452454456458,
    460462466468470472474476478480482484,
    486488490492494496498500503505507509,
    511514516518520522524526528530532534,
    536538540542544547549552554556558560,
    562564566568570572574576578580582584,
    586588590592594596598600602604606608,
    610612614616618620622624626628630632,
    634636638639640641642643644645646647,
    648649650651652653654655656657658659,
    675677679681683685687689691693695697,
    699701703705708710712714716718720722,
    725727729731733736738740742744746748,
    750752754756758760762764766768771773,
    775777779781783785787789791793795797,
    799801803805807809811813815817819821,
    823824825826827828829830831832840842,
    844846848850852854856858860862864866,
    868870872874876878880882884886888890,
    892894895896897898899900901902903904,
    905906907908909910911912913914915916,
    917918919923929932934940959962964966,
    968970972974976979981983985987990992,
    994996998, 1000, 1002, 1004, 1006, 1008, 1010, 1012, 1014, 1016,
   1018, 1020, 1022, 1025, 1027, 1030, 1032, 1034, 1036, 1038, 1040, 1042,
   1044, 1046, 1048, 1050, 1052, 1054, 1056, 1058, 1060, 1062, 1064, 1066,
   1068, 1070, 1072, 1074, 1076, 1078, 1080, 1082, 1084, 1086, 1088, 1090,
   1092, 1094, 1096, 1098, 1100, 1102, 1104, 1106, 1107, 1108
  };
}

private static final short _lexer_key_offsets[] = init__lexer_key_offsets_0();


private static byte[] init__lexer_trans_keys_0()
{
  return new byte [] {
    -17,   10,   32,   34,   35,   37,   42,   64,   65,   67,   68,   69,
     70,   73,   80,   81,   82124,    9,   13,  -69,  -65,   10,   32,
     34,   35,   37,   42,   64,   65,   67,   68,   69,   70,   73,   80,
     81,   82124,    9,   13,   34,   34,   10,   13,   10,   13,   10,
     32,   34,    9,   13,   10,   32,   34,    9,   13,   10,   32,   34,
      9,   13,   10,   32,   34,    9,   13,   10,   32,    9,   13,   10,
     32,    9,   13,   10,   13,   10,   95,   70,   69,   65,   84,   85,
     82,   69,   95,   69,   78,   68,   95,   37,   32,   10,   13,   10,
     13,   13,   32,   64,    9,   10,    9,   10,   13,   32,   64,   11,
     12,   10,   32,   64,    9,   13108110116101115104,
    111114101115116101,   99101100101110116,
    115,   58,   10,   10,   10,   32,   35,   37,   42,   64,   65,   67,
     68,   69,   70,   73,   80,   81,    9,   13,   10,   95,   10,   70,
     10,   69,   10,   65,   10,   84,   10,   85,   10,   82,   10,   69,
     10,   95,   10,   69,   10,   78,   10,   68,   10,   95,   10,   37,
     10,   32,   10,   32,   34,   35,   37,   42,   64,   65,   67,   68,
     69,   70,   73,   80,   81,   82124,    9,   13,   97108114,
     97,   99116101114,  -61,  -83115116105,   99,   97,
     58,   10,   10,   10,   32,   35,   37,   64,   65,   67,   69,   70,
     82,    9,   13,   10,   95,   10,   70,   10,   69,   10,   65,   10,
     84,   10,   85,   10,   82,   10,   69,   10,   95,   10,   69,   10,
     78,   10,   68,   10,   95,   10,   37,   10110,   10116,   10,
    101,   10,   99,   10101,   10100,   10101,   10110,   10,
    116,   10115,   10,   58,   10,   97,   10114,   10,   97,   10,
     99,   10116,   10101,   10114,  -61,   10,  -83,   10,   10,
    115,   10116,   10105,   10,   99,   10,   97,   10115120,
     10,   99113,   10101,   10110,   10,   97,   10114,   10,
    105,   10117,   10101,   10109,   10,   97,   10,   32,   10,
    100,   10101,   10,   32,   10108,   10,   39,   10101,   10,
    115,   10,   99,   10101,   10109,   10112,   10108,   10,
    101,   10117,   10110,   10,   99,   10105,   10111,   10,
    110,   10,   97,   10108,   10105,   10116,   10,   97,   10,
    116,   10101,   10114,   10101,   10102,   10111,   10,
    110111110,   97100116,   97115120,   99113101,
    110,   97114105,   58,   10,   10,   10,   32,   35,   37,   42,
     64,   65,   67,   68,   69,   70,   73,   80,   81,   82,    9,   13,
     10,   95,   10,   70,   10,   69,   10,   65,   10,   84,   10,   85,
     10,   82,   10,   69,   10,   95,   10,   69,   10,   78,   10,   68,
     10,   95,   10,   37,   10,   32,   10108110116,   10101,
     10115,   10104,   10111,   10114,   10101,   10115,
     10116,   10101,   10,   99,   10101,   10100,   10101,
     10110,   10116,   10115,   10,   58,  -61,   10101,  -88,
     10,   10115,   10,   97,   10,   97,   10108114,   10,   97,
     10,   99,   10116,   10101,   10114,  -61,   10,  -83,   10,
     10115,   10116,   10105,   10,   99,   10,   97,   10111,
     10110,   10,   97,   10100116,   10115,   10,   99113,
     10101,   10110,   10,   97,   10114,   10105,   10117,
     10101,   10109,   10,   97,   10,   32,   10100,   10101,
     10,   32,   10108,   10,   39,   10101,   10115,   10,   99,
     10117,   10110,   10,   99,   10105,   10111,   10110,
     10,   97,   10108,   10105,   10116,   10,   97,   10116,
     10101,   10114,  -61,   10,  -78,   10,   10117,   10,   97,
     10110,   10101,   10114,   10101,   10102,   10111,
     10110117101109,   97,   32100101,   32108,   39,
    101115,   99101110,   97114105,   58,   10,   10,   10,
     32,   35,   37,   42,   64,   65,   67,   68,   69,   70,   73,   80,
     81,    9,   13,   10,   95,   10,   70,   10,   69,   10,   65,   10,
     84,   10,   85,   10,   82,   10,   69,   10,   95,   10,   69,   10,
     78,   10,   68,   10,   95,   10,   37,   10,   32,   10108116,
     10101,   10115,   10104,   10111,   10114,   10101,
     10115,  -61,   10101,  -88,   10,   10115,   10,   97,   10,
     97,   10108114,   10,   97,   10,   99,   10116,   10101,
     10114,  -61,   10,  -83,   10,   10115,   10116,   10105,
     10,   99,   10,   97,   10,   58,   10111,   10110,   10,   97,
     10100116,   10115,   10,   99,   10101,   10110,   10,
     97,   10114,   10105,   10117,   10110,   10,   99,   10,
    105,   10111,   10110,   10,   97,   10108,   10105,   10,
    116,   10,   97,   10116,   10101,   10114,  -61,   10,  -78,
     10,   10117,   10,   97,   10110101109112108101,
    115,   58,   10,   10,   10,   32,   35,   67,   70124,    9,   13,
     10,   97,   10114,   10,   97,   10,   99,   10116,   10101,
     10114,  -61,   10,  -83,   10,   10115,   10116,   10105,
     10,   99,   10,   97,   10,   58,   10117,   10110,   10,   99,
     10105,   10111,   10110,   10,   97,   10108,   10105,
     10116,   10,   97,   10116117110,   99105111110,
     97108105116,   97116101114,  -61,  -78117,   97,
    110101114101102111110,   32124,    9,   13,   10,
     32,   92124,    9,   13,   10,   92124,   10,   92,   10,   32,
     92124,    9,   13,   10,   32,   34,   35,   37,   42,   64,   65,
     67,   68,   69,   70,   73,   80,   81,   82124,    9,   13,   10,
    108116,   10101,   10115,   10104,   10111,   10114,
     10101,   10115,  -61,   10101,  -88,   10,   10115,   10,
     97,   10,   97,   10108114,   10,   97,   10,   99,   10116,
     10101,   10114,  -61,   10,  -83,   10,   10115,   10116,
     10105,   10,   99,   10,   97,   10,   58,   10111,   10110,
     10,   97,   10100116,   10115,   10,   99113,   10101,
     10110,   10,   97,   10114,   10105,   10117,   10101,
     10109,   10,   97,   10,   32,   10100,   10101,   10,   32,
     10108,   10,   39,   10101,   10115,   10,   99,   10117,
     10110,   10,   99,   10105,   10111,   10110,   10,   97,
     10108,   10105,   10116,   10,   97,   10116,   10101,
     10114,  -61,   10,  -78,   10,   10117,   10,   97,   10110,
    -61101,  -88115,    0
  };
}

private static final byte _lexer_trans_keys[] = init__lexer_trans_keys_0();


private static byte[] init__lexer_single_lengths_0()
{
  return new byte [] {
      0,   18,    1,    1,   17,    1,    1,    2,    2,    3,    3,    3,
      3,    2,    2,    2,    1,    1,    1,    1,    1,    1,    1,    1,
      1,    1,    1,    1,    1,    1,    1,    1,    2,    2,    3,    5,
      3,    3,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
      1,    1,    1,    1,    1,    1,    1,    1,    1,   14,    2,    2,
      2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
      2,   17,    1,    2,    1,    1,    1,    1,    1,    1,    1,    1,
      1,    1,    1,    1,    1,    1,    1,   10,    2,    2,    2,    2,
      2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
      2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
      2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    3,
      3,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
      2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
      2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
      2,    2,    2,    2,    2,    2,    1,    1,    1,    2,    1,    2,
      2,    1,    1,    1,    1,    1,    1,    1,    1,   15,    2,    2,
      2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
      2,    4,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
      2,    2,    2,    2,    2,    2,    2,    3,    2,    2,    2,    2,
      3,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
      2,    2,    2,    2,    3,    2,    3,    2,    2,    2,    2,    2,
      2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
      2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
      2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
      2,    2,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
      1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,   14,
      2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
      2,    2,    2,    3,    2,    2,    2,    2,    2,    2,    2,    3,
      2,    2,    2,    2,    3,    2,    2,    2,    2,    2,    2,    2,
      2,    2,    2,    2,    2,    2,    2,    2,    2,    3,    2,    2,
      2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
      2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
      1,    1,    1,    1,    1,    1,    1,    1,    1,    6,    2,    2,
      2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
      2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
      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,    2,    4,    3,    2,    4,   17,    3,    2,    2,    2,
      2,    2,    2,    2,    3,    2,    2,    2,    2,    3,    2,    2,
      2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
      2,    2,    3,    2,    3,    2,    2,    2,    2,    2,    2,    2,
      2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
      2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
      2,    2,    2,    2,    2,    2,    2,    1,    1,    0
  };
}

private static final byte _lexer_single_lengths[] = init__lexer_single_lengths_0();


private static byte[] init__lexer_range_lengths_0()
{
  return new byte [] {
      0,    1,    0,    0,    1,    0,    0,    0,    0,    1,    1,    1,
      1,    1,    1,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    1,    1,
      1,    0,    0,    0,    0,    0,    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,    1,    0,    0,    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,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    1,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    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,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    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,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    1,    1,    0,    0,    1,    1,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0
  };
}

private static final byte _lexer_range_lengths[] = init__lexer_range_lengths_0();


private static short[] init__lexer_index_offsets_0()
{
  return new short [] {
      0,    0,   20,   22,   24,   43,   45,   47,   50,   53,   58,   63,
     68,   73,   77,   81,   84,   86,   88,   90,   92,   94,   96,   98,
    100102104106108110112114116119122127,
    134139143145147149151153155157159161,
    163165167169171173175177179181197200,
    203206209212215218221224227230233236,
    239242261263266268270272274276278280,
    282284286288290292294296308311314317,
    320323326329332335338341344347350353,
    356359362365368371374377380383386389,
    392395398401404407410413416419422425,
    429433436439442445448451454457460463,
    466469472475478481484487490493496499,
    502505508511514517520523526529532535,
    538541544547550553556558560562565567,
    570573575577579581583585587589606609,
    612615618621624627630633636639642645,
    648651656659662665668671674677680683,
    686689692695698701704707711714717720,
    723727730733736739742745748751754757,
    760763766769772776779783786789792795,
    798801804807810813816819822825828831,
    834837840843846849852855858861864867,
    870873876879882885888891894897900903,
    906909912914916918920922924926928930,
    932934936938940942944946948950952954,
    970973976979982985988991994997, 1000, 1003,
   1006, 1009, 1012, 1015, 1019, 1022, 1025, 1028, 1031, 1034, 1037, 1040,
   1044, 1047, 1050, 1053, 1056, 1060, 1063, 1066, 1069, 1072, 1075, 1078,
   1081, 1084, 1087, 1090, 1093, 1096, 1099, 1102, 1105, 1108, 1112, 1115,
   1118, 1121, 1124, 1127, 1130, 1133, 1136, 1139, 1142, 1145, 1148, 1151,
   1154, 1157, 1160, 1163, 1166, 1169, 1172, 1175, 1178, 1181, 1184, 1187,
   1190, 1192, 1194, 1196, 1198, 1200, 1202, 1204, 1206, 1208, 1216, 1219,
   1222, 1225, 1228, 1231, 1234, 1237, 1240, 1243, 1246, 1249, 1252, 1255,
   1258, 1261, 1264, 1267, 1270, 1273, 1276, 1279, 1282, 1285, 1288, 1291,
   1294, 1297, 1299, 1301, 1303, 1305, 1307, 1309, 1311, 1313, 1315, 1317,
   1319, 1321, 1323, 1325, 1327, 1329, 1331, 1333, 1335, 1337, 1339, 1341,
   1343, 1345, 1347, 1351, 1357, 1361, 1364, 1370, 1389, 1393, 1396, 1399,
   1402, 1405, 1408, 1411, 1414, 1418, 1421, 1424, 1427, 1430, 1434, 1437,
   1440, 1443, 1446, 1449, 1452, 1455, 1458, 1461, 1464, 1467, 1470, 1473,
   1476, 1479, 1482, 1486, 1489, 1493, 1496, 1499, 1502, 1505, 1508, 1511,
   1514, 1517, 1520, 1523, 1526, 1529, 1532, 1535, 1538, 1541, 1544, 1547,
   1550, 1553, 1556, 1559, 1562, 1565, 1568, 1571, 1574, 1577, 1580, 1583,
   1586, 1589, 1592, 1595, 1598, 1601, 1604, 1607, 1609, 1611
  };
}

private static final short _lexer_index_offsets[] = init__lexer_index_offsets_0();


private static short[] init__lexer_indicies_0()
{
  return new short [] {
      1,    3,    2,    4,    5,    6,    7,    8,    9,   10,   11,   12,
     13,    7,   14,   15,   16,   17,    2,    0,   18,    0,    2,    0,
      3,    2,    4,    5,    6,    7,    8,    9,   10,   11,   12,   13,
      7,   14,   15,   16,   17,    2,    0,   19,    0,   20,    0,   22,
     23,   21,   25,   26,   24,   29,   28,   30,   28,   27,   33,   32,
     34,   32,   31,   33,   32,   35,   32,   31,   33,   32,   36,   32,
     31,   38,   37,   37,    0,    3,   39,   39,    0,   41,   42,   40,
      3,    0,   43,    0,   44,    0,   45,    0,   46,    0,   47,    0,
     48,    0,   49,    0,   50,    0,   51,    0,   52,    0,   53,    0,
     54,    0,   55,    0,   56,    0,   57,    0,   59,   60,   58,   62,
     63,   61,    0,    0,    0,    0,   64,   65,   66,   65,   65,   68,
     67,   64,    3,   69,    8,   69,    0,   70,   71,   72,    0,   73,
      0,   74,    0,   75,    0,   76,    0,   77,    0,   78,    0,   79,
      0,   80,    0,   81,    0,   82,    0,   83,    0,   84,    0,   85,
      0,   86,    0,   87,    0,   88,    0,   89,    0,   91,   90,   93,
     92,   93,   94,   95,   96,   97,   95,   98,   99100101102,
     97103104,   94,   92,   93105,   92,   93106,   92,   93,
    107,   92,   93108,   92,   93109,   92,   93110,   92,   93,
    111,   92,   93112,   92,   93113,   92,   93114,   92,   93,
    115,   92,   93116,   92,   93117,   92,   93118,   92,   93,
    119,   92121120122123124125126127128129,
    130131125132133134135120,    0136,    0,   79,
    137,    0138,    0139,    0140,    0141,    0142,    0,
    143,    0144,    0145,    0146,    0147,    0148,    0,
    149,    0150,    0152151154153154155156157,
    156158159160161162155153154163153154,
    164153154165153154166153154167153154,
    168153154169153154170153154171153154,
    172153154173153154174153154175153154,
    176153154177153154178153154179153154,
    180153154181153154182153154183153154,
    184153154185153154186153154187153154,
    188153154189153154190153154191153154,
    192153154193153154194153195154153196,
    154153154197153154198153154199153154,
    200153154186153154201202153154203204,
    153154205153154206153154207153154208,
    153154186153154209153154210153154211,
    153154212153154213153154214153154215,
    153154216153154217153154218153154219,
    153154220153154203153154221153154222,
    153154223153154224153154185153154225,
    153154226153154227153154228153154229,
    153154230153154231153154232153154233,
    153154234153154235153154186153154236,
    153154237153154238153154239153154240,
    153154185153241,    0242,    0243,    0244,   79,
      0,   79,    0245246,    0247248,    0249,    0250,
      0251,    0252,    0253,    0254,    0256255258,
    257258259260261262260263264265266267,
    262268269270259257258271257258272257,
    258273257258274257258275257258276257,
    258277257258278257258279257258280257,
    258281257258282257258283257258284257,
    258285257258286287288257258289257258,
    290257258291257258292257258293257258,
    294257258295257258296257258297257258,
    298257258299257258300257258301257258,
    302257258303257258304257258285257305,
    258306257294258257258307257258295257,
    258308257258295309257258310257258311,
    257258312257258313257258314257315258,
    257316258257258317257258318257258319,
    257258320257258304257258321257258322,
    257258323257258307295257258324257258,
    325326257258327257258328257258329257,
    258330257258304257258331257258332257,
    258333257258334257258335257258336257,
    258337257258338257258339257258340257,
    258341257258342257258325257258343257,
    258344257258345257258346257258347257,
    258348257258349257258350257258351257,
    258352257258353257258304257258354257,
    258355257356258257295258257258357257,
    258358257258295257258359257258360257,
    258361257258362257258363257258303257,
    364,    0365,    0366,    0367,    0368,    0369,    0,
    370,    0371,    0372,    0373,    0374,    0375,    0,
    376,    0377,    0378,    0379,    0380,    0381,    0,
    382,    0384383386385386387388389390388,
    391392393394395390396397387385386398,
    385386399385386400385386401385386402,
    385386403385386404385386405385386406,
    385386407385386408385386409385386410,
    385386411385386412385386413414385386,
    415385386416385386417385386418385386,
    419385386420385386421385422386423385,
    420386385386424385386421385386425385,
    386421426385386427385386428385386429,
    385386430385386431385432386385433386,
    385386434385386435385386436385386437,
    385386438385386412385386439385386440,
    385386441385386424421385386442385386,
    443385386444385386445385386446385386,
    447385386438385386448385386449385386,
    450385386451385386452385386453385386,
    454385386455385386456385386457385386,
    458385386438385386459385386460385461,
    386385421386385386462385386463385386,
    421385464,    0465,    0466,    0467,    0468,    0,
    469,    0470,    0472471474473474475476477,
    478476475473474479473474480473474481,
    473474482473474483473474484473474485,
    473486474473487474473474488473474489,
    473474490473474491473474492473474493,
    473474494473474495473474496473474497,
    473474498473474499473474500473474501,
    473474502473474503473474504473474492,
    473505,    0506,    0507,    0508,    0509,    0510,
      0511,    0512,    0513,    0514,    0515,    0149,
      0516,    0517,    0518,    0,   79,    0519,    0520,
      0,   79,    0521,    0522,    0523,    0524,    0525,
      0,   87,    0526527526,    0530529531532529,
    528,    0534535533,    0534533530536534535,
    536533530537538539540541542543544545,
    546547541548549550551537,    0,   93552553,
     92,   93554,   92,   93555,   92,   93556,   92,   93557,
     92,   93558,   92,   93559,   92,   93560,   92561,   93,
    562,   92559,   93,   92,   93563,   92,   93560,   92,   93,
    564,   92,   93560565,   92,   93566,   92,   93567,   92,
     93568,   92,   93569,   92,   93570,   92571,   93,   92,
    572,   93,   92,   93573,   92,   93574,   92,   93575,   92,
     93576,   92,   93577,   92,   93119,   92,   93578,   92,
     93579,   92,   93580,   92,   93563560,   92,   93581,
     92,   93582583,   92,   93584,   92,   93585,   92,   93,
    586,   92,   93587,   92,   93577,   92,   93588,   92,   93,
    589,   92,   93590,   92,   93591,   92,   93592,   92,   93,
    593,   92,   93594,   92,   93595,   92,   93596,   92,   93,
    597,   92,   93598,   92,   93599,   92,   93582,   92,   93,
    600,   92,   93601,   92,   93602,   92,   93603,   92,   93,
    604,   92,   93605,   92,   93606,   92,   93607,   92,   93,
    608,   92,   93609,   92,   93610,   92,   93577,   92,   93,
    611,   92,   93612,   92613,   93,   92560,   93,   92,   93,
    614,   92,   93615,   92,   93560,   92616617,    0,   78,
      0244,    0618,    0
  };
}

private static final short _lexer_indicies[] = init__lexer_indicies_0();


private static short[] init__lexer_trans_targs_0()
{
  return new short [] {
      0,    2,    4,    4,    5,   15,   17,   31,   34,   37,   74174,
    179421433437440446,    3,    6,    7,    8,    9,    8,
      8,    9,    8,   10,   10,   10,   11,   10,   10,   10,   11,   12,
     13,   14,    4,   14,   15,    4,   16,   18,   19,   20,   21,   22,
     23,   24,   25,   26,   27,   28,   29,   30525,   32,   33,    4,
     16,   33,    4,   16,   35,   36,    4,   35,   34,   36,   38,   45,
    522,   39,   40,   41,   42,   43,   44,   31,   46,   47,   48,   49,
     50,   51,   52,   53,   54,   55,   56,   57,   56,   57,   57,    4,
     58,   72452464479483503515519,   59,   60,   61,
     62,   63,   64,   65,   66,   67,   68,   69,   70,   71,    4,   73,
      4,    4,    5,   15,   17,   31,   34,   37,   74174179421,
    433437440446,   75,   76,   77,   78,   79,   80,   81,   82,
     83,   84,   85,   86,   87,   88,   89,   90,   91,   90,   91,   91,
      4,   92106117131156168,   93,   94,   95,   96,   97,
     98,   99100101102103104105,    4107108109,
    110111112113114115116,   73118119120121,
    122123124125126127128129130132151133,
    138134135136137139140141142143144145,
    146147148149150152153154155157158159,
    160161162163164165166167169170171172,
    173175176177178180384181290182183184,
    185186187188189188189189,    4190204205,
    227241245265277281284191192193194195,
    196197198199200201202203,    4,   73206213,
    223207208209210211212204214215216217,
    218219220221222224225226228229230231,
    232233234235236237238239240242243244,
    246247252248249250251253254255256257,
    258259260261262263264266267268269270,
    271272273274275276278279280282283285,
    286287288289291292293294295296297298,
    299300301302303304305306307308309310,
    311310311311,    4312326327339354358365,
    377381313314315316317318319320321322,
    323324325,    4,   73328335329330331332333,
    334326336337338340341342343344345346,
    347348349350351352353355356357359360,
    361362363364366367368369370371372373,
    374375376378379380382383385386387388,
    389390391392393392393393,    4394409395,
    396397398399400401402403404405406407,
    408,   73410411412413414415416417418419,
    420422423424425426427428429430431432,
    434435436438439441442443444445446447,
    448450451449447448449447450451,    5,   15,
     17,   31,   34,   37,   74174179421433437440446,
    453460454455456457458459,   72461462463,
    465466467468469470471472473474475476,
    477478480481482484485490486487488489,
    491492493494495496497498499500501502,
    504505506507508509510511512513514516,
    517518520521523524,    0
  };
}

private static final short _lexer_trans_targs[] = init__lexer_trans_targs_0();


private static short[] init__lexer_trans_actions_0()
{
  return new short [] {
     43,    0,    0,   54,    3,    1,    0,   29,    1,   29,   29,   29,
     29,   29,   29,   29,   29,   35,    0,    0,    0,    7139,   48,
      0102,    9,    5,   45134,   45,    0,   33122,   33,   33,
      0,   11106,    0,    0114,   25,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,   57149,
    126,    0110,   23,    0,   27118,   27,   51,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,   57144,    0,   54,    0,   72,
     33,   84,   84,   84,   84,   84,   84,   84,   84,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,   15,   15,
     31130,   60,   57,   31,   63,   57,   63,   63,   63,   63,   63,
     63,   63,   63,   66,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,   57144,    0,   54,    0,
     69,   33,   84,   84,   84,   84,   84,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,   13,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,   13,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,   57144,    0,   54,    0,   75,   33,   84,   84,
     84,   84,   84,   84,   84,   84,   84,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,   17,   17,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,   57,
    144,    0,   54,    0,   78,   33,   84,   84,   84,   84,   84,   84,
     84,   84,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,   19,   19,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,   57144,    0,   54,    0,   81,   84,   84,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,   21,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
     37,   37,   54,   37,   87,    0,    0,   39,    0,    0,   93,   90,
     41,   96,   90,   96,   96,   96,   96,   96,   96,   96,   96,   99,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0
  };
}

private static final short _lexer_trans_actions[] = init__lexer_trans_actions_0();


private static short[] init__lexer_eof_actions_0()
{
  return new short [] {
      0,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
     43,   43,   43,   43,   43,   43,   43,   43,   43,   43
  };
}

private static final short _lexer_eof_actions[] = init__lexer_eof_actions_0();


static final int lexer_start = 1;
static final int lexer_first_final = 525;

static final int lexer_en_main = 1;


// line 159 "ragel/i18n/ca.java.rl"

  public void scan(String source)  {
    String input = source + "\n%_FEATURE_END_%";
    byte[] data = null;
    try {
      data = input.getBytes("UTF-8");
    } catch(UnsupportedEncodingException e) {
      throw new RuntimeException(e);
    }
    int cs, p = 0, pe = data.length;
    int eof = pe;

    int lineNumber = 1;
    int lastNewline = 0;

    int contentStart = -1;
    int currentLine = -1;
    int docstringContentTypeStart = -1;
    int docstringContentTypeEnd = -1;
    int startCol = -1;
    int nextKeywordStart = -1;
    int keywordStart = -1;
    String keyword = null;
    List<String> currentRow = null;

   
// line 715 "java/src/main/java/gherkin/lexer/Ca.java"
  {
  cs = lexer_start;
  }

// line 185 "ragel/i18n/ca.java.rl"
   
// line 722 "java/src/main/java/gherkin/lexer/Ca.java"
  {
  int _klen;
  int _trans = 0;
  int _acts;
  int _nacts;
  int _keys;
  int _goto_targ = 0;

  _goto: while (true) {
  switch ( _goto_targ ) {
  case 0:
  if ( p == pe ) {
    _goto_targ = 4;
    continue _goto;
  }
  if ( cs == 0 ) {
    _goto_targ = 5;
    continue _goto;
  }
case 1:
  _match: do {
  _keys = _lexer_key_offsets[cs];
  _trans = _lexer_index_offsets[cs];
  _klen = _lexer_single_lengths[cs];
  if ( _klen > 0 ) {
    int _lower = _keys;
    int _mid;
    int _upper = _keys + _klen - 1;
    while (true) {
      if ( _upper < _lower )
        break;

      _mid = _lower + ((_upper-_lower) >> 1);
      if ( data[p] < _lexer_trans_keys[_mid] )
        _upper = _mid - 1;
      else if ( data[p] > _lexer_trans_keys[_mid] )
        _lower = _mid + 1;
      else {
        _trans += (_mid - _keys);
        break _match;
      }
    }
    _keys += _klen;
    _trans += _klen;
  }

  _klen = _lexer_range_lengths[cs];
  if ( _klen > 0 ) {
    int _lower = _keys;
    int _mid;
    int _upper = _keys + (_klen<<1) - 2;
    while (true) {
      if ( _upper < _lower )
        break;

      _mid = _lower + (((_upper-_lower) >> 1) & ~1);
      if ( data[p] < _lexer_trans_keys[_mid] )
        _upper = _mid - 2;
      else if ( data[p] > _lexer_trans_keys[_mid+1] )
        _lower = _mid + 2;
      else {
        _trans += ((_mid - _keys)>>1);
        break _match;
      }
    }
    _trans += _klen;
  }
  } while (false);

  _trans = _lexer_indicies[_trans];
  cs = _lexer_trans_targs[_trans];

  if ( _lexer_trans_actions[_trans] != 0 ) {
    _acts = _lexer_trans_actions[_trans];
    _nacts = (int) _lexer_actions[_acts++];
    while ( _nacts-- > 0 )
  {
      switch ( _lexer_actions[_acts++] )
      {
  case 0:
// line 16 "ragel/i18n/ca.java.rl"
  {
      contentStart = p;
      currentLine = lineNumber;
      if(keyword != null) {
        startCol = p - lastNewline - (keyword.length() + 1);
      }
    }
  break;
  case 1:
// line 24 "ragel/i18n/ca.java.rl"
  {
      currentLine = lineNumber;
      startCol = p - lastNewline;
    }
  break;
  case 2:
// line 29 "ragel/i18n/ca.java.rl"
  {
      contentStart = p;
    }
  break;
  case 3:
// line 33 "ragel/i18n/ca.java.rl"
  {
      docstringContentTypeStart = p;
    }
  break;
  case 4:
// line 37 "ragel/i18n/ca.java.rl"
  {
      docstringContentTypeEnd = p;
    }
  break;
  case 5:
// line 41 "ragel/i18n/ca.java.rl"
  {
      String con = unindent(startCol, substring(data, contentStart, nextKeywordStart-1).replaceFirst("(\\r?\\n)?([\\t ])*\\Z", "").replace("\\\"\\\"\\\"", "\"\"\""));
      String conType = substring(data, docstringContentTypeStart, docstringContentTypeEnd).trim();
      listener.docString(conType, con, currentLine);
    }
  break;
  case 6:
// line 47 "ragel/i18n/ca.java.rl"
  {
      String[] nameDescription = nameAndUnindentedDescription(startCol, keywordContent(data, p, eof, nextKeywordStart, contentStart));
      listener.feature(keyword, nameDescription[0], nameDescription[1], currentLine);
      if(nextKeywordStart != -1) p = nextKeywordStart - 1;
      nextKeywordStart = -1;
    }
  break;
  case 7:
// line 54 "ragel/i18n/ca.java.rl"
  {
      String[] nameDescription = nameAndUnindentedDescription(startCol, keywordContent(data, p, eof, nextKeywordStart, contentStart));
      listener.background(keyword, nameDescription[0], nameDescription[1], currentLine);
      if(nextKeywordStart != -1) p = nextKeywordStart - 1;
      nextKeywordStart = -1;
    }
  break;
  case 8:
// line 61 "ragel/i18n/ca.java.rl"
  {
      String[] nameDescription = nameAndUnindentedDescription(startCol, keywordContent(data, p, eof, nextKeywordStart, contentStart));
      listener.scenario(keyword, nameDescription[0], nameDescription[1], currentLine);
      if(nextKeywordStart != -1) p = nextKeywordStart - 1;
      nextKeywordStart = -1;
    }
  break;
  case 9:
// line 68 "ragel/i18n/ca.java.rl"
  {
      String[] nameDescription = nameAndUnindentedDescription(startCol, keywordContent(data, p, eof, nextKeywordStart, contentStart));
      listener.scenarioOutline(keyword, nameDescription[0], nameDescription[1], currentLine);
      if(nextKeywordStart != -1) p = nextKeywordStart - 1;
      nextKeywordStart = -1;
    }
  break;
  case 10:
// line 75 "ragel/i18n/ca.java.rl"
  {
      String[] nameDescription = nameAndUnindentedDescription(startCol, keywordContent(data, p, eof, nextKeywordStart, contentStart));
      listener.examples(keyword, nameDescription[0], nameDescription[1], currentLine);
      if(nextKeywordStart != -1) p = nextKeywordStart - 1;
      nextKeywordStart = -1;
    }
  break;
  case 11:
// line 82 "ragel/i18n/ca.java.rl"
  {
      listener.step(keyword, substring(data, contentStart, p).trim(), currentLine);
    }
  break;
  case 12:
// line 86 "ragel/i18n/ca.java.rl"
  {
      listener.comment(substring(data, contentStart, p).trim(), lineNumber);
      keywordStart = -1;
    }
  break;
  case 13:
// line 91 "ragel/i18n/ca.java.rl"
  {
      listener.tag(substring(data, contentStart, p).trim(), currentLine);
      keywordStart = -1;
    }
  break;
  case 14:
// line 96 "ragel/i18n/ca.java.rl"
  {
      lineNumber++;
    }
  break;
  case 15:
// line 100 "ragel/i18n/ca.java.rl"
  {
      lastNewline = p + 1;
    }
  break;
  case 16:
// line 104 "ragel/i18n/ca.java.rl"
  {
      if(keywordStart == -1) keywordStart = p;
    }
  break;
  case 17:
// line 108 "ragel/i18n/ca.java.rl"
  {
      keyword = substring(data, keywordStart, p).replaceFirst(":$","");
      keywordStart = -1;
    }
  break;
  case 18:
// line 113 "ragel/i18n/ca.java.rl"
  {
      nextKeywordStart = p;
    }
  break;
  case 19:
// line 117 "ragel/i18n/ca.java.rl"
  {
      p = p - 1;
      currentRow = new ArrayList<String>();
      currentLine = lineNumber;
    }
  break;
  case 20:
// line 123 "ragel/i18n/ca.java.rl"
  {
      contentStart = p;
    }
  break;
  case 21:
// line 127 "ragel/i18n/ca.java.rl"
  {
      String con = substring(data, contentStart, p).trim();
      currentRow.add(con
        .replace("\\|", "|")
        .replace("\\n", "\n")
        .replace("\\\\", "\\")
      );
    }
  break;
  case 22:
// line 136 "ragel/i18n/ca.java.rl"
  {
      listener.row(currentRow, currentLine);
    }
  break;
  case 23:
// line 140 "ragel/i18n/ca.java.rl"
  {
      if(cs < lexer_first_final) {
        String content = currentLineContent(data, lastNewline);
        throw new LexingError("Lexing error on line " + lineNumber + ": '" + content + "'. See http://wiki.github.com/cucumber/gherkin/lexingerror for more information.");
      } else {
        listener.eof();
      }
    }
  break;
// line 983 "java/src/main/java/gherkin/lexer/Ca.java"
      }
    }
  }

case 2:
  if ( cs == 0 ) {
    _goto_targ = 5;
    continue _goto;
  }
  if ( ++p != pe ) {
    _goto_targ = 1;
    continue _goto;
  }
case 4:
  if ( p == eof )
  {
  int __acts = _lexer_eof_actions[cs];
  int __nacts = (int) _lexer_actions[__acts++];
  while ( __nacts-- > 0 ) {
    switch ( _lexer_actions[__acts++] ) {
  case 23:
// line 140 "ragel/i18n/ca.java.rl"
  {
      if(cs < lexer_first_final) {
        String content = currentLineContent(data, lastNewline);
        throw new LexingError("Lexing error on line " + lineNumber + ": '" + content + "'. See http://wiki.github.com/cucumber/gherkin/lexingerror for more information.");
      } else {
        listener.eof();
      }
    }
  break;
// line 1015 "java/src/main/java/gherkin/lexer/Ca.java"
    }
  }
  }

case 5:
  }
  break; }
  }

// line 186 "ragel/i18n/ca.java.rl"
  }

  private String keywordContent(byte[] data, int p, int eof, int nextKeywordStart, int contentStart) {
    int endPoint = (nextKeywordStart == -1 || (p == eof)) ? p : nextKeywordStart;
    return substring(data, contentStart, endPoint);
  }

  private String[] nameAndUnindentedDescription(int startCol, String text) {
    String[] lines = text.split("\n");
    String name = lines.length > 0 ? lines[0].trim() : "";
    StringBuffer description = new StringBuffer();
    for(int i = 1; i < lines.length; i++) {
      description.append(lines[i]);
      description.append("\n");
    }
    return new String[]{name, unindent(startCol+2, description.toString()).replaceAll("\\s+$", "")};
  }

  private String unindent(int startCol, String text) {
    return Pattern.compile("^[\t ]{0," + startCol + "}", Pattern.MULTILINE).matcher(text).replaceAll("");
  }

  private String currentLineContent(byte[] data, int lastNewline) {
    return substring(data, lastNewline, data.length).trim();
  }

  private String substring(byte[] data, int start, int end) {
    try {
      return new String(data, start, end-start, "utf-8");
    } catch(java.io.UnsupportedEncodingException e) {
      throw new RuntimeException("Internal error", e);
    }
  }
}
TOP

Related Classes of gherkin.lexer.Ca

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.