Package gherkin.lexer

Source Code of gherkin.lexer.Hu

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


  private final Listener listener;

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

 
// line 26 "java/src/main/java/gherkin/lexer/Hu.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,   19,   20,   21,   22,   24,   26,   44,   45,   46,   48,
     50,   55,   60,   65,   70,   74,   78,   80,   81,   82,   83,   84,
     85,   86,   87,   88,   89,   90,   91,   92,   93,   94,   95100,
    107112115116117118119120121123124125,
    126127128129130131132133134135136137,
    138139140141142143144146147148149150,
    151152153154155156171173175177195197,
    198199200201202203204205206221223225,
    227229231233235237239241243245247249,
    251253255259261263265267269271274276,
    278280282284286288290292294296298300,
    302304306308310312314316319321323325,
    327329331333335337339341343345347349,
    351353355357359360361362363364365366,
    367368369370381383385387389391393395,
    397399401403405407409411413415417419,
    421423425427429431433435438440442444,
    446448450452454456458460462464466468,
    470472474476478480482484486488490492,
    494496498499500501502503504505506507,
    508509510511518520522524526528530532,
    534536540546549551557575577579581583,
    585587589591593595597599601603607609,
    611613615617619622624626628630632634,
    636638640642644646648650652654656658,
    660662664666668670672674676678680682,
    684686688690691692707709711713715717,
    719721723725727729731733735737739741,
    745747749751753755757760762764766768,
    770772774776778780782784786788790792,
    794796798800802805807809811813815817,
    819821824826828830832834836838840842,
    844846848850852854856858859860
  };
}

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


private static byte[] init__lexer_trans_keys_0()
{
  return new byte [] {
    -61,  -17,   10,   32,   34,   35,   37,   42,   64,   65,   68,   70,
     72,   74,   77,   80124,    9,   13, -119115,   32,   10,   13,
     10,   13,  -61,   10,   32,   34,   35,   37,   42,   64,   65,   68,
     70,   72,   74,   77,   80124,    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,   13,
     32,   64,    9,   10,    9,   10,   13,   32,   64,   11,   12,   10,
     32,   64,    9,   13100107109111116116107111,
    114101105110110121105,   98101110101111,
    114103,   97116,  -61,  -77107,  -61,  -74110121118,
     32,   58118,  -61,  -95122108,   97116,   58,   10,   10,
    -61,   10,   32,   35,   37,   42,   64,   65,   68,   70,   72,   74,
     77,    9,   13, -119,   10,   10115,   10,   32,  -61,   10,   32,
     34,   35,   37,   42,   64,   65,   68,   70,   72,   74,   77,   80,
    124,    9,   13,  -61,   97,  -95116116,  -61,  -87114,   58,
     10,   10,  -61,   10,   32,   35,   37,   42,   64,   65,   68,   70,
     72,   74,   77,    9,   13, -119,   10,   10115,   10,   32,   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,   10100107109,   10111,   10116,   10,
    116,   10107,   10111,   10114,   10101105,   10110,
     10110,   10121,   10105,   10,   98,   10101,   10110,
     10101,   10111,   10114,   10103,   10,   97,   10116,
    -61,   10,  -77,   10,   10107,  -61,   10,  -74,   10,   10110,
     10121,   10118,   10,   32,   58,   10118,  -61,   10,  -95,
     10,   10122,   10108,   10,   97,   10116,   10,   58,   10,
     97,   10101,   10108,   10108,   10101,   10109,   10,
    122,  -59,   10, -111,   10,   10,   97,   10106,   10100101,
    108108101109122,  -59, -111,   58,   10,   10,   10,   32,
     35,   37,   64,   70,   72,   74,   80,    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,   10114,   10103,   10,   97,   10116,  -61,
     10,  -77,   10,   10107,  -61,   10,  -74,   10,   10110,   10,
    121,   10118,   10,   32,   58,   10118,  -61,   10,  -95,   10,
     10122,   10108,   10,   97,   10116,   10,   58,  -61,   10,
    -95,   10,   10116,   10116,  -61,   10,  -87,   10,   10114,
     10101,   10108,   10108,   10101,   10109,   10122,
    -59,   10, -111,   10,  -61,   10,  -87,   10,   10108,   10100,
    -61,   10,  -95,   10,   10107,   97106100,  -61,  -87108,
    100,  -61,  -95107,   58,   10,   10,   10,   32,   35,   74124,
      9,   13,   10101,   10108,   10108,   10101,   10109,
     10122,  -59,   10, -111,   10,   10,   58,   32124,    9,   13,
     10,   32,   92124,    9,   13,   10,   92124,   10,   92,   10,
     32,   92124,    9,   13,  -61,   10,   32,   34,   35,   37,   42,
     64,   65,   68,   70,   72,   74,   77,   80124,    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,   10100107109,   10111,   10116,   10,
    116,   10107,   10111,   10114,   10101105,   10110,
     10110,   10121,   10105,   10,   98,   10101,   10110,
     10101,   10111,   10114,   10103,   10,   97,   10116,
    -61,   10,  -77,   10,   10107,  -61,   10,  -74,   10,   10110,
     10121,   10118,   10,   58,   10,   97,   10101,   10108,
     10108,   10101,   10109,   10122,  -59,   10, -111,   10,
     10,   97,   10106,   10100,   10,   10,  -61,   10,   32,   35,
     37,   42,   64,   65,   68,   70,   72,   74,   77,    9,   13, -119,
     10,   10115,   10,   32,   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,   10100107,
    109,   10111,   10116,   10116,   10107,   10111,   10,
    114,   10101105,   10110,   10110,   10121,   10105,
     10,   98,   10101,   10110,   10101,   10111,   10114,
     10103,   10,   97,   10116,  -61,   10,  -77,   10,   10107,
    -61,   10,  -74,   10,   10110,   10121,   10118,   10,   32,
     58,   10118,  -61,   10,  -95,   10,   10122,   10108,   10,
     97,   10116,   10,   58,  -61,   10,   97,  -95,   10,   10116,
     10116,  -61,   10,  -87,   10,   10114,   10101,   10108,
     10108,   10101,   10109,   10122,  -59,   10, -111,   10,
     10,   97,   10106,   10100,  -69,  -65,    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,   17,    1,    1,    1,    2,    2,   16,    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,    3,    5,
      3,    3,    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,    2,    1,    1,    1,    1,    1,
      1,    1,    1,    1,    1,   13,    2,    2,    2,   16,    2,    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,
      2,    2,    4,    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,    3,    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,    9,    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,    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,    5,    2,    2,    2,    2,    2,    2,    2,    2,
      2,    2,    4,    3,    2,    4,   16,    2,    2,    2,    2,    2,
      2,    2,    2,    2,    2,    2,    2,    2,    2,    4,    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,    2,    2,    2,    2,    2,
      2,    2,    2,    1,    1,   13,    2,    2,    2,    2,    2,    2,
      2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    2,    4,
      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,    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,    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,    0,    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,    1,    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,    1,    0,    0,    0,    1,    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,    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,    1,    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,    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
  };
}

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,   19,   21,   23,   25,   28,   31,   49,   51,   53,   56,
     59,   64,   69,   74,   79,   83,   87,   90,   92,   94,   96,   98,
    100102104106108110112114116118120125,
    132137141143145147149151153156158160,
    162164166168170172174176178180182184,
    186188190192194196198201203205207209,
    211213215217219221236239242245263266,
    268270272274276278280282284299302305,
    308311314317320323326329332335338341,
    344347350355358361364367370373377380,
    383386389392395398401404407410413416,
    419422425428431434437440444447450453,
    456459462465468471474477480483486489,
    492495498501504506508510512514516518,
    520522524526537540543546549552555558,
    561564567570573576579582585588591594,
    597600603606609612615618622625628631,
    634637640643646649652655658661664667,
    670673676679682685688691694697700703,
    706709712714716718720722724726728730,
    732734736738745748751754757760763766,
    769772776782786789795813816819822825,
    828831834837840843846849852855860863,
    866869872875878882885888891894897900,
    903906909912915918921924927930933936,
    939942945948951954957960963966969972,
    975978981984986988, 1003, 1006, 1009, 1012, 1015, 1018,
   1021, 1024, 1027, 1030, 1033, 1036, 1039, 1042, 1045, 1048, 1051, 1054,
   1059, 1062, 1065, 1068, 1071, 1074, 1077, 1081, 1084, 1087, 1090, 1093,
   1096, 1099, 1102, 1105, 1108, 1111, 1114, 1117, 1120, 1123, 1126, 1129,
   1132, 1135, 1138, 1141, 1144, 1148, 1151, 1154, 1157, 1160, 1163, 1166,
   1169, 1172, 1176, 1179, 1182, 1185, 1188, 1191, 1194, 1197, 1200, 1203,
   1206, 1209, 1212, 1215, 1218, 1221, 1224, 1227, 1229, 1231
  };
}

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


private static short[] init__lexer_indicies_0()
{
  return new short [] {
      1,    2,    4,    3,    5,    6,    7,    8,    9,   10,   11,   12,
     13,   14,   15,   16,   17,    3,    0,   18,    0,   19,    0,   20,
      0,   22,   23,   21,   25,   26,   24,    1,    4,    3,    5,    6,
      7,    8,    9,   10,   11,   12,   13,   14,   15,   16,   17,    3,
      0,   27,    0,   28,    0,   30,   31,   29,   33,   34,   32,   37,
     36,   38,   36,   35,   41,   40,   42,   40,   39,   41,   40,   43,
     40,   39,   41,   40,   44,   40,   39,   46,   45,   45,    0,    4,
     47,   47,    0,   49,   50,   48,    4,    0,   51,    0,   52,    0,
     53,    0,   54,    0,   55,    0,   56,    0,   57,    0,   58,    0,
     59,    0,   60,    0,   61,    0,   62,    0,   63,    0,   64,    0,
      0,    0,    0,    0,   65,   66,   67,   66,   66,   69,   68,   65,
      4,   70,    9,   70,    0,   71,   72,   73,    0,   74,    0,   75,
      0,   19,    0,   76,    0,   77,    0,   19,    0,   78,   72,    0,
     79,    0,   80,    0,   81,    0,   82,    0,   83,    0,   84,    0,
     19,    0,   19,    0,   85,    0,   86,    0,   87,    0,   88,    0,
     89,    0,   90,    0,   91,    0,   92,    0,   93,    0,   94,    0,
     95,    0,   96,    0,   97,    0,   98,   99,    0100,    0101,
      0102,    0103,    0104,    0105,    0106,    0107,
      0109108111110112111113114115116114,
    117118119120121122113110123111110111,
    124110111125110126128127129130131132,
    133134135136137138139140141127,    0142,
     19,    0143,    0144,    0145,    0146,    0147,    0,
    148,    0149,    0151150153152154153155156,
    157158156159160161162163164155152165,
    153152153166152153167152153168152153,
    169152153170152153171152153172152153,
    173152153174152153175152153176152153,
    177152153178152153179152153180152153,
    181152153182183184152153185152153186,
    152153166152153187152153188152153166,
    152153189183152153190152153191152153,
    192152153193152153194152153195152153,
    166152153166152153196152153197152153,
    198152153199152153200152201153152202,
    153152153203152204153152205153152153,
    206152153207152153208152153209167152,
    153210152211153152212153152153213152,
    153214152153215152153216152153167152,
    153166152153217152153218152153219152,
    153220152153221152153222152223153152,
    216153152153224152153225152153166152,
    226,    0227,    0228,    0229,    0230,    0231,    0,
    232,    0233,    0234,    0236235238237238239,
    240241240242243244245239237238246237,
    238247237238248237238249237238250237,
    238251237238252237238253237238254237,
    238255237238256237238257237238258237,
    238259237238260237238261237238262237,
    238263237238264237265238237266238237,
    238267237268238237269238237238270237,
    238271237238272237238273274237238275,
    237276238237277238237238278237238279,
    237238280237238281237238274237282238,
    237283238237238284237238285237286238,
    237287238237238281237238288237238289,
    237238290237238291237238292237238293,
    237294238237281238237295238237296238,
    237238297237238298237299238237300238,
    237238281237301,    0302,    0,   19,    0303,    0,
    304,    0305,    0306,    0307,    0308,    0309,    0,
    310,    0312311314313314315316317316315,
    313314318313314319313314320313314321,
    313314322313314323313324314313325314,
    313314326313327328327,    0331330332333,
    330329,    0335336334,    0335334331337335,
    336337334338331339340341342343344345,
    346347348349350351352339,    0111353110,
    111354110111355110111356110111357110,
    111358110111359110111360110111361110,
    111362110111363110111364110111365110,
    111366110111367368369110111370110111,
    371110111124110111372110111373110111,
    124110111374368110111375110111376110,
    111377110111378110111379110111380110,
    111124110111124110111381110111382110,
    111383110111384110111385110386111110,
    387111110111388110389111110390111110,
    111391110111392110111393110111125110,
    111124110111394110111395110111396110,
    111397110111398110111399110400111110,
    393111110111401110111402110111124110,
    404403406405407406408409410411409412,
    413414415416417408405418406405406419,
    405406420405406421405406422405406423,
    405406424405406425405406426405406427,
    405406428405406429405406430405406431,
    405406432405406433405406434405406435,
    436437405406438405406439405406419405,
    406440405406441405406419405406442436,
    405406443405406444405406445405406446,
    405406447405406448405406419405406419,
    405406449405406450405406451405406452,
    405406453405454406405455406405406456,
    405457406405458406405406459405406460,
    405406461405406462420405406463405464,
    406405465406405406466405406467405406,
    468405406469405406420405470406419405,
    471406405406472405406473405474406405,
    475406405406469405406476405406477405,
    406478405406479405406480405406481405,
    482406405469406405406483405406484405,
    406419405485,    0,    3,    0486,    0
  };
}

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


private static short[] init__lexer_trans_targs_0()
{
  return new short [] {
      0,    2391,    7,    7,    8,   18,   20,    4,   34,   37,   52,
     53,   82160230233253,    3,    4,    5,    6,    7,   19,
      6,    7,   19,    9,   10,   11,   12,   11,   11,   12,   11,   13,
     13,   13,   14,   13,   13,   13,   14,   15,   16,   17,    7,   17,
     18,    7,   19,   21,   22,   23,   24,   25,   26,   27,   28,   29,
     30,   31,   32,   33393,   35,   36,    7,   35,   34,   36,   38,
     41,   44,   39,   40,   42,   43,   45,   46,   47,   48,   49,   50,
     51,   54,   55,   56,   57,   58,   59,   60,   61,   62,   63,   64,
     65,   66,   67315,   68,   69,   70,   71,   72,   73,   74,   75,
     76,   77,   76,   77,   78,   77,    7259,   80273288289,
    303304312,   79,   80,   81,    2,    7,    7,    8,   18,   20,
      4,   34,   37,   52,   53,   82160230233253,   83,   84,
     85,   86,   87,   88,   89,   90,   91,   92,   91,   92,   93,   92,
      7,   96,   95110125126148149157,   94,   95,   81,
     97,   98,   99100101102103104105106107108,
    109,    7111114117112113115116118119120,
    121122123124127128129130131132133134,
    135136137138139140141142143144145146,
    147150151152153154155156158159161162,
    163164165166167168169170171170171171,
      7172186208215223173174175176177178,
    179180181182183184185,    7187188189190,
    191192193194195196197198199200,   81201,
    202203204205206207209210211212213214,
    216217218219220221222224225226227228,
    229231232234235236237238239240241242,
    243242243243,    7244245246247248249250,
    251252,   81253254255257258256254255256,
    254257,    2258,    8,   18,   20,    4,   34,   37,   52,   53,
     82160230233253260261262263264265266,
    267268269270271272,    7274277280275276,
    278279281282283284285286287290291292,
    293294295296297298299300301302305306,
    307308309310311313314316317316317318,
    317,    7321320335350351373380388319320,
     81322323324325326327328329330331332,
    333334,    7336339342337338340341343344,
    345346347348349352353354355356357358,
    359360361362363364365366367368369370,
    371372374375376377378379381382383384,
    385386387389390392,    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,   29,    0,    0,   54,    3,    1,    0,   29,    1,   29,   29,
     29,   29,   29,   29,   29,   35,    0,    0,    0,   57149126,
      0110,   23,    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,   27118,   27,   51,    0,    0,
      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      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,   84,    0,   78,   33,   84,   84,   84,   84,
     84,   84,   84,    0,    0,   19,   63,   31130,   60,   57,   31,
     63,   57,   63,   63,   63,   63,   63,   63,   63,   66,    0,    0,
      0,    0,    0,    0,    0,    0,   57144,    0,   54,   84,    0,
     72,   33,   84,   84,   84,   84,   84,   84,   84,    0,    0,   15,
      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,   57144,    0,   54,    0,
     69,   33,   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,    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,   57,
    144,    0,   54,    0,   81,   84,    0,    0,    0,    0,    0,    0,
      0,    0,   21,    0,    0,   37,   37,   54,   37,   87,    0,    0,
     39,    0,   96,    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,   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,   57144,    0,   54,   84,
      0,   75,   33,   84,   84,   84,   84,   84,   84,   84,    0,    0,
     17,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      0,    0,   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
  };
}

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
  };
}

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


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

static final int lexer_en_main = 1;


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

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

case 5:
  }
  break; }
  }

// line 186 "ragel/i18n/hu.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.Hu

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.