Package gherkin.lexer

Source Code of gherkin.lexer.Cs

// line 1 "ragel/i18n/cs.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 Cs implements Lexer {
 
// line 150 "ragel/i18n/cs.java.rl"


  private final Listener listener;

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

 
// line 26 "java/src/main/java/gherkin/lexer/Cs.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,   18,   19,   20,   37,   38,   39,   41,   43,   48,   53,
     58,   63,   67,   71,   73,   74,   75,   76,   77,   78,   79,   80,
     81,   82,   83,   84,   85,   86,   87,   88,   89,   91,   93,   98,
    105110112115118121124127130131133134,
    135136137138139140141142143144159161,
    163165167169171173175177179181183185,
    187189206207208209210211212213214215,
    216217218219220221222223224225226239,
    241243245247249251253255257259261263,
    265267269272290291292293294295296297,
    300301302303304305306307308309310311,
    318320322324326328330332334336338339,
    342343344345346347348349350351352364,
    366368370372374376378380382384386388,
    390392394396398400402404406408410412,
    414416418420422424426428430432434436,
    438440442444446448450452454457459461,
    463465467469471473476478480482484486,
    488490492494496498500502504506508510,
    512514515516517518519520521522523524,
    525526527528529530531546548550552554,
    556558560562564566568570572574576579,
    597598599600601602603604605606607608,
    609610611612613614615616620626629631,
    637654656659661663665667669671673675,
    677679681683685687689691693695697699,
    701703705707709711713715717719721723,
    725728730734736738740742744746748750,
    752754756758760762764766768770772774,
    776778780782784786788790792794796798,
    800802804805806807808809811813815817,
    819822824827829831833835837839841843,
    845847849851853855857859861863865867,
    869871873875877879881883885887889891,
    894912913914915916917919921923925927,
    929931933935937939941943945947949951,
    953955957959961963965967969971973975,
    977980982985987989991993995997999, 1001,
   1003, 1005, 1007, 1009, 1011, 1013, 1015, 1017, 1019, 1021, 1023, 1025,
   1027, 1029, 1031, 1033, 1035, 1037, 1039, 1041, 1043, 1045, 1047
  };
}

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,   75,   78,   79,
     80,   83,   90124,    9,   13,  -69,  -65,   10,   32,   34,   35,
     37,   42,   64,   65,   75,   78,   79,   80,   83,   90124,    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,   13,   32108,   10,   13116,   10,   13,   97,   10,   13,
    107,  -61,   10,   13,  -87,   10,   13,   10,   13,   32101100,
    111121,  -59,  -66110116101120116,   58,   10,   10,
     10,   32,   35,   37,   42,   64,   65,   75,   78,   79,   80,   83,
     90,    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,   75,   78,   79,   80,   83,   90124,
      9,   13,  -61,  -95,  -60, -115114116,   32,   83,   99,  -61,
    -87110,  -61,  -95,  -59, -103101,   58,   10,   10,   10,   32,
     35,   37,   42,   64,   65,   75,   80,   83,   90,    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,   32108,   10,   32,   34,   35,
     37,   42,   64,   65,   75,   78,   79,   80,   83,   90116124,
      9,   13115110111118,   97,   32115,  -59,   97111,
   -103,  -61,  -83107108,   97100121,   58,   10,   10,   10,
     32,   35,   80124,    9,   13,   10111,  -59,   10,  -66,   10,
     10,   97,   10100,   10,   97,   10118,   10101,   10107,
     10,   58107,  -59107122,  -66,   97100,   97118101,
    107,   58,   10,   10,   10,   32,   35,   37,   64,   75,   78,   79,
     80,   83,    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,   10111,   10110,
     10116,   10101,   10120,   10116,   10,   58,  -61,   10,
    -95,   10,  -60,   10, -115,   10,   10114,   10116,   10,   32,
     10,   83,   10,   99,  -61,   10,  -87,   10,   10110,  -61,   10,
    -95,   10,  -59,   10, -103,   10,   10101,   10115,   10110,
     10111,   10118,   10,   97,   10,   32,   10115,  -59,   10,
    111, -103,   10,  -61,   10,  -83,   10,   10107,   10108,   10,
     97,   10100,   10121,  -59,   10122,  -66,   10,   10,   97,
     10100,   10,   97,   10118,   10101,   10107,   10,   97,
     10100,  -61,   10,  -83,   10,   10,   99,  -61,   10,  -87,   10,
     10110,  -61,   10,  -95,   10,  -59,   10, -103,   10117100,
     97100,  -61,  -83,   99,  -61,  -87110,  -61,  -95,  -59, -103,
     58,   10,   10,   10,   32,   35,   37,   42,   64,   65,   75,   78,
     79,   80,   83,   90,    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,   32108,   10,   32,   34,   35,   37,   42,   64,   65,   75,
     78,   79,   80,   83,   90116124,    9,   13,   97,   32112,
    -59, -103101100112111107108,   97100117,   97,
    107,  -61,  -87,   32,   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,   75,   78,   79,
     80,   83,   90124,    9,   13,   10101,   10100111,   10,
    121,  -59,   10,  -66,   10,   10110,   10116,   10101,   10,
    120,   10116,   10,   58,  -61,   10,  -95,   10,  -60,   10, -115,
     10,   10114,   10116,   10,   32,   10,   83,   10,   99,  -61,
     10,  -87,   10,   10110,  -61,   10,  -95,   10,  -59,   10, -103,
     10,   10101,   10115,   10110,   10111,   10118,   10,
     97,   10,   32,   10115,   10,   97111,   10107,  -59,   10,
    107122,  -66,   10,   10,   97,   10100,   10,   97,   10118,
     10101,   10107,   10117,   10100,   10,   97,   10100,
    -61,   10,  -83,   10,   10,   99,  -61,   10,  -87,   10,   10110,
    -61,   10,  -95,   10,  -59,   10, -103,   10,   10,   97,   10,   32,
     10112,  -59,   10, -103,   10,   10101,   10100,   10112,
     10111,   10107,   10108,   10,   97,   10100,   10117,
     97107,  -61,  -87,   32,   10101,   10100,   10121,  -59,
     10,  -66,   10,   10,   97111,   10107,  -59,   10107,  -66,
     10,   10,   97,   10100,   10,   97,   10118,   10101,   10,
    107,   10,   58,   10117,   10100,   10,   99,  -61,   10,  -87,
     10,   10110,  -61,   10,  -95,   10,  -59,   10, -103,   10,   10,
     97,   10,   32,   10112,  -59,   10, -103,   10,   10101,   10,
    100,   10112,   10111,   10107,   10108,   10,   97,   10,
    100,   10117,   10,   32108,   10,   32,   34,   35,   37,   42,
     64,   65,   75,   78,   79,   80,   83,   90116124,    9,   13,
     97107,  -61,  -87,   32,   10101,   10100,   10121,  -59,
     10,  -66,   10,  -61,   10,  -95,   10,  -60,   10, -115,   10,   10,
    114,   10116,   10,   32,   10,   83,   10,   99,  -61,   10,  -87,
     10,   10110,  -61,   10,  -95,   10,  -59,   10, -103,   10,   10,
    101,   10,   58,   10115,   10110,   10111,   10118,   10,
     97,   10,   32,   10115,   10,   97111,   10107,  -59,   10,
    107,  -66,   10,   10,   97,   10100,   10,   97,   10118,   10,
    101,   10107,   10117,   10100,   10,   99,  -61,   10,  -87,
     10,   10110,  -61,   10,  -95,   10,  -59,   10, -103,   10,   10,
     97,   10,   32,   10112,  -59,   10, -103,   10,   10101,   10,
    100,   10112,   10111,   10107,   10108,   10,   97,   10,
    100,   10117,    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,   16,    1,    1,   15,    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,    2,    3,    3,    3,    3,    3,    3,    1,    2,    1,    1,
      1,    1,    1,    1,    1,    1,    1,    1,    1,   13,    2,    2,
      2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
      2,   15,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
      1,    1,    1,    1,    1,    1,    1,    1,    1,    1,   11,    2,
      2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
      2,    2,    3,   16,    1,    1,    1,    1,    1,    1,    1,    3,
      1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    5,
      2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    1,    3,
      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,    2,    2,    2,    2,    2,    2,    3,    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,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
      1,    1,    1,    1,    1,    1,   13,    2,    2,    2,    2,    2,
      2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    3,   16,
      1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
      1,    1,    1,    1,    1,    1,    1,    2,    4,    3,    2,    4,
     15,    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,
      3,    2,    4,    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,    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,    3,
     16,    1,    1,    1,    1,    1,    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,    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,    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,    0,    0,    0,    1,    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,    1,
      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,    1,    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,    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,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      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
  };
}

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,   18,   20,   22,   39,   41,   43,   46,   49,   54,   59,
     64,   69,   73,   77,   80,   82,   84,   86,   88,   90,   92,   94,
     96,   98100102104106108110112115118123,
    130135138142146150154158162164167169,
    171173175177179181183185187189204207,
    210213216219222225228231234237240243,
    246249266268270272274276278280282284,
    286288290292294296298300302304306319,
    322325328331334337340343346349352355,
    358361364368386388390392394396398400,
    404406408410412414416418420422424426,
    433436439442445448451454457460463465,
    469471473475477479481483485487489501,
    504507510513516519522525528531534537,
    540543546549552555558561564567570573,
    576579582585588591594597600603606609,
    612615618621624627630633636640643646,
    649652655658661664668671674677680683,
    686689692695698701704707710713716719,
    722725727729731733735737739741743745,
    747749751753755757759774777780783786,
    789792795798801804807810813816819823,
    841843845847849851853855857859861863,
    865867869871873875877879883889893896,
    902919922926929932935938941944947950,
    953956959962965968971974977980983986,
    989992995998, 1001, 1004, 1007, 1010, 1013, 1016, 1019, 1022,
   1025, 1029, 1032, 1037, 1040, 1043, 1046, 1049, 1052, 1055, 1058, 1061,
   1064, 1067, 1070, 1073, 1076, 1079, 1082, 1085, 1088, 1091, 1094, 1097,
   1100, 1103, 1106, 1109, 1112, 1115, 1118, 1121, 1124, 1127, 1130, 1133,
   1136, 1139, 1142, 1144, 1146, 1148, 1150, 1152, 1155, 1158, 1161, 1164,
   1167, 1171, 1174, 1178, 1181, 1184, 1187, 1190, 1193, 1196, 1199, 1202,
   1205, 1208, 1211, 1214, 1217, 1220, 1223, 1226, 1229, 1232, 1235, 1238,
   1241, 1244, 1247, 1250, 1253, 1256, 1259, 1262, 1265, 1268, 1271, 1274,
   1278, 1296, 1298, 1300, 1302, 1304, 1306, 1309, 1312, 1315, 1318, 1321,
   1324, 1327, 1330, 1333, 1336, 1339, 1342, 1345, 1348, 1351, 1354, 1357,
   1360, 1363, 1366, 1369, 1372, 1375, 1378, 1381, 1384, 1387, 1390, 1393,
   1396, 1400, 1403, 1407, 1410, 1413, 1416, 1419, 1422, 1425, 1428, 1431,
   1434, 1437, 1440, 1443, 1446, 1449, 1452, 1455, 1458, 1461, 1464, 1467,
   1470, 1473, 1476, 1479, 1482, 1485, 1488, 1491, 1494, 1497, 1500
  };
}

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,   14,   15,   16,    2,    0,   17,    0,    2,    0,    3,    2,
      4,    5,    6,    7,    8,    9,   10,   11,   12,   13,   14,   15,
     16,    2,    0,   18,    0,   19,    0,   21,   22,   20,   24,   25,
     23,   28,   27,   29,   27,   26,   32,   31,   33,   31,   30,   32,
     31,   34,   31,   30,   32,   31,   35,   31,   30,   37,   36,   36,
      0,    3,   38,   38,    0,   40,   41,   39,    3,    0,   42,    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,   58,   59,   57,   61,   62,   60,    0,    0,
      0,    0,   63,   64,   65,   64,   64,   67,   66,   63,    3,   68,
      8,   68,    0,   69,   70,    0,   58,   59,   71,   57,   61,   62,
     72,   60,   61,   62,   73,   60,   74,   61,   62,   60,   75,   61,
     62,   60,   61,   62,   56,   60,   76,    0,   77,   78,    0,   79,
      0,   80,    0,   76,    0,   81,    0,   82,    0,   83,    0,   84,
      0,   85,    0,   86,    0,   88,   87,   90,   89,   90,   91,   92,
     93,   94,   92,   95,   96,   97,   98,   99100101,   91,   89,
     90102,   89,   90103,   89,   90104,   89,   90105,   89,
     90106,   89,   90107,   89,   90108,   89,   90109,   89,
     90110,   89,   90111,   89,   90112,   89,   90113,   89,
     90114,   89,   90115,   89,   90116,   89118117119,
    120121122123124125126127128129130131,
    117,    0132,    0133,    0134,    0135,    0136,    0,
    137,    0138,    0139,    0140,    0141,    0142,    0,
    143,    0144,    0145,    0146,    0147,    0148,    0,
    149,    0151150153152153154155156157155,
    158159160161162154152153163152153164,
    152153165152153166152153167152153168,
    152153169152153170152153171152153172,
    152153173152153174152153175152153176,
    152153177152153178179152118117119120,
    121122123124125126127128129130180131,
    117,    0181,    0182,    0183,    0184,    0185,    0,
    186,    0139,    0187188189,    0190,    0191,    0,
    192,    0193,    0194,    0195,    0196,    0197,    0,
    198,    0200199202201202203204205204203,
    201202206201207202201208202201202209,
    201202210201202211201202212201202213,
    201202214201202215201,   76,    0216217218,
      0219,    0220,    0221,    0222,    0223,    0224,
      0225,    0226,    0228227230229230231232,
    233232234235236237238231229230239229,
    230240229230241229230242229230243229,
    230244229230245229230246229230247229,
    230248229230249229230250229230251229,
    230252229230253229230254229230255229,
    230256229230257229230258229230259229,
    260230229261230229262230229263230229,
    230264229230265229230266229230267229,
    230268229269230229270230229230271229,
    272230229273230229274230229275230229,
    230258229230276229230277229230278229,
    230279229230280229230281229230267229,
    282230283229284230229285230229286230,
    229230287229230288229230289229230290,
    229230258229291230292229293230229230,
    294229230295229230296229230297229230,
    298229230258229230299229230300229301,
    230229258230229230302229303230229304,
    230229230305229306230229307230229308,
    230229258230229309,    0,   76,    0310,    0311,
      0312,    0,   85,    0313,    0314,    0315,    0316,
      0317,    0318,    0319,    0320,    0321,    0323,
    322325324325326327328329327330331332,
    333334335336326324325337324325338324,
    325339324325340324325341324325342324,
    325343324325344324325345324325346324,
    325347324325348324325349324325350324,
    325351324325352353324118117119120121,
    122123124125126127128129130354131117,
      0355,    0356,    0357,    0358,    0359,    0360,
      0361,    0362,    0363,    0364,    0365,    0366,
      0367,    0,   76,    0368,    0369,    0370,    0371,
      0351,    0372373372,    0376375377378375,
    374,    0380381379,    0380379376382380381,
    382379376383384385386387388389390391,
    392393394395396383,    0325397324325398,
    399324325400324401325324397325324325,
    402324325403324325404324325405324325,
    406324325351324407325324408325324409,
    325324410325324325411324325412324325,
    413324325414324325415324416325324417,
    325324325418324419325324420325324421,
    325324422325324325406324325423324325,
    424324325425324325426324325427324325,
    428324325414324325429430324325397324,
    431325432433324434325324325435324325,
    436324325437324325438324325439324325,
    406324325440324325397324325441324325,
    442324443325324406325324325444324445,
    325324446325324325447324448325324449,
    325324450325324406325324325451324325,
    452324325453324454325324455325324325,
    456324325457324325458324325459324325,
    460324325461324325462324325463324325,
    397324464,    0465,    0466,    0467,    0177,    0,
    153468152153469152153470152471153152,
    468153152153472473152153468152474153,
    475152476153152153477152153478152153,
    479152153480152153481152153482152153,
    177152153483152153468152153484152485,
    153152486153152153487152488153152489,
    153152490153152482153152153491152153,
    492152153493152494153152495153152153,
    496152153497152153498152153499152153,
    500152153501152153502152153503152153,
    468152,   90504505,   89118117119120121122,
    123124125126127128129130506131117,    0,
    507,    0508,    0509,    0510,    0116,    0,   90511,
     89,   90512,   89,   90513,   89514,   90,   89511,   90,
     89515,   90,   89516,   90,   89517,   90,   89518,   90,
     89,   90519,   89,   90520,   89,   90521,   89,   90522,
     89,   90523,   89524,   90,   89525,   90,   89,   90526,
     89527,   90,   89528,   90,   89529,   90,   89530,   90,
     89,   90531,   89,   90116,   89,   90532,   89,   90533,
     89,   90534,   89,   90535,   89,   90536,   89,   90537,
     89,   90522,   89,   90538539,   89,   90511,   89540,
     90541,   89542,   90,   89,   90543,   89,   90544,   89,
     90545,   89,   90546,   89,   90547,   89,   90531,   89,
     90548,   89,   90511,   89,   90549,   89550,   90,   89,
    551,   90,   89,   90552,   89553,   90,   89554,   90,   89,
    555,   90,   89531,   90,   89,   90556,   89,   90557,   89,
     90558,   89559,   90,   89560,   90,   89,   90561,   89,
     90562,   89,   90563,   89,   90564,   89,   90565,   89,
     90566,   89,   90567,   89,   90568,   89,   90511,   89,
    569,    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,   45,   74,
    112119235264283,    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,   30478,   32,   33,    4,   16,
     33,    4,   16,   35,   36,    4,   35,   34,   36,   38,   44,   39,
     40,   41,   42,   43,   31,   46,   49,   47,   48,   50,   51,   52,
     53,   54,   55,   56,   57,   56,   57,   57,    4,   58,   72407,
    415419437444456464,   59,   60,   61,   62,   63,   64,
     65,   66,   67,   68,   69,   70,   71,    4,   73,    4,    4,    5,
     15,   17,   31,   34,   37,   45,   74112119235264283,
     75,   76,   77,   78,   79,   80,   81,   82,   83,   84,   85,   86,
     87,   88,   89,   90,   91,   92,   93,   94,   93,   94,   94,    4,
     95109110368372385393,   96,   97,   98,   99100,
    101102103104105106107108,    4,   73111367,
    362113114115116117118120142143121122,
    123124125126127128129130131130131131,
      4132133134135136137138139140141,   73,
    144229231145146147148149150151152153,
    154153154154,    4155169176193200221156,
    157158159160161162163164165166167168,
      4170171172173174175,   73177178179180,
    181182183184185186187188189190191192,
    194195196197198199201209202203204205,
    206207208210217211212213214215216218,
    219220222223224225226227228230232233,
    234236237238239240241242243244245246,
    245246246,    4247261262290300317324340,
    348248249250251252253254255256257258,
    259260,    4,   73263289278265266267268269,
    270271272273274275276277279280281282,
    283284285287288286284285286284287288,
      5,   15,   17,   31,   34,   37,   45,   74112119235264,
    283261291294292293295296297298299301,
    302303304305306307308309310311312313,
    314315316318319320321322323325326327,
    334336328329330331332333335337338339,
    341342343344345346347349350351352353,
    354355356357358359360361363364365366,
    109369370371373374375383376377378379,
    380381382384386387388389390391392394,
    395396397398399400401402403404405406,
    408414409410411412413,   72416417418420,
    421422423424425426427428429430431432,
    433434435436438439440441442443445446,
    447454448449450451452453455457458459,
    460461462463465466467468469470471472,
    473474475476477,    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,   35,    0,    0,    0,    7139,   48,    0,
    102,    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,   57149126,
      0110,   23,    0,   27118,   27,   51,    0,    0,    0,   57,
      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,   66,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,   57144,    0,   54,    0,   78,
     33,   84,   84,   84,   84,   84,   84,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,   19,   19,   19,    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,    0,    0,    0,    0,    0,    0,    0,    0,    0,   21,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,   57,
    144,    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,   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,   57144,
      0,   54,    0,   75,   33,   84,   84,   84,   84,   84,   84,   84,
     84,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,   17,   17,   17,    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,
     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,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
     15,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,    0,    0,    0,    0,    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
  };
}

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


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

static final int lexer_en_main = 1;


// line 159 "ragel/i18n/cs.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 673 "java/src/main/java/gherkin/lexer/Cs.java"
  {
  cs = lexer_start;
  }

// line 185 "ragel/i18n/cs.java.rl"
   
// line 680 "java/src/main/java/gherkin/lexer/Cs.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/cs.java.rl"
  {
      contentStart = p;
      currentLine = lineNumber;
      if(keyword != null) {
        startCol = p - lastNewline - (keyword.length() + 1);
      }
    }
  break;
  case 1:
// line 24 "ragel/i18n/cs.java.rl"
  {
      currentLine = lineNumber;
      startCol = p - lastNewline;
    }
  break;
  case 2:
// line 29 "ragel/i18n/cs.java.rl"
  {
      contentStart = p;
    }
  break;
  case 3:
// line 33 "ragel/i18n/cs.java.rl"
  {
      docstringContentTypeStart = p;
    }
  break;
  case 4:
// line 37 "ragel/i18n/cs.java.rl"
  {
      docstringContentTypeEnd = p;
    }
  break;
  case 5:
// line 41 "ragel/i18n/cs.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/cs.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/cs.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/cs.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/cs.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/cs.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/cs.java.rl"
  {
      listener.step(keyword, substring(data, contentStart, p).trim(), currentLine);
    }
  break;
  case 12:
// line 86 "ragel/i18n/cs.java.rl"
  {
      listener.comment(substring(data, contentStart, p).trim(), lineNumber);
      keywordStart = -1;
    }
  break;
  case 13:
// line 91 "ragel/i18n/cs.java.rl"
  {
      listener.tag(substring(data, contentStart, p).trim(), currentLine);
      keywordStart = -1;
    }
  break;
  case 14:
// line 96 "ragel/i18n/cs.java.rl"
  {
      lineNumber++;
    }
  break;
  case 15:
// line 100 "ragel/i18n/cs.java.rl"
  {
      lastNewline = p + 1;
    }
  break;
  case 16:
// line 104 "ragel/i18n/cs.java.rl"
  {
      if(keywordStart == -1) keywordStart = p;
    }
  break;
  case 17:
// line 108 "ragel/i18n/cs.java.rl"
  {
      keyword = substring(data, keywordStart, p).replaceFirst(":$","");
      keywordStart = -1;
    }
  break;
  case 18:
// line 113 "ragel/i18n/cs.java.rl"
  {
      nextKeywordStart = p;
    }
  break;
  case 19:
// line 117 "ragel/i18n/cs.java.rl"
  {
      p = p - 1;
      currentRow = new ArrayList<String>();
      currentLine = lineNumber;
    }
  break;
  case 20:
// line 123 "ragel/i18n/cs.java.rl"
  {
      contentStart = p;
    }
  break;
  case 21:
// line 127 "ragel/i18n/cs.java.rl"
  {
      String con = substring(data, contentStart, p).trim();
      currentRow.add(con
        .replace("\\|", "|")
        .replace("\\n", "\n")
        .replace("\\\\", "\\")
      );
    }
  break;
  case 22:
// line 136 "ragel/i18n/cs.java.rl"
  {
      listener.row(currentRow, currentLine);
    }
  break;
  case 23:
// line 140 "ragel/i18n/cs.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 941 "java/src/main/java/gherkin/lexer/Cs.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/cs.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 973 "java/src/main/java/gherkin/lexer/Cs.java"
    }
  }
  }

case 5:
  }
  break; }
  }

// line 186 "ragel/i18n/cs.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.Cs

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.