#line 1 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
/************************* Required for every parser *************************/
#ifndef RAGEL_NIX_PARSER
#define RAGEL_NIX_PARSER

#include "ragel_parser_macros.h"

// the name of the language
const char *NIX_LANG = "nix";

// the languages entities
const char *nix_entities[] = {
  "space", "comment", "any"
};

// constants associated with the entities
enum {
  NIX_SPACE = 0, NIX_COMMENT, NIX_ANY
};

/*****************************************************************************/

#include "shell.h"


#line 27 "ext/ohcount_native/ragel_parsers/nix.h"
static const char _nix_actions[] = {
	0, 1, 2, 1, 3, 1, 8, 1, 
	9, 1, 11, 1, 12, 1, 16, 1, 
	17, 1, 20, 1, 21, 1, 27, 1, 
	28, 1, 29, 1, 31, 1, 32, 1, 
	34, 1, 35, 1, 36, 1, 37, 1, 
	38, 1, 39, 1, 44, 1, 45, 1, 
	46, 1, 47, 1, 48, 1, 49, 1, 
	50, 1, 51, 1, 55, 1, 56, 1, 
	57, 1, 58, 1, 59, 1, 60, 1, 
	61, 1, 66, 1, 67, 1, 68, 1, 
	69, 1, 70, 1, 73, 1, 76, 1, 
	77, 1, 78, 1, 79, 1, 80, 1, 
	82, 1, 83, 1, 84, 1, 86, 1, 
	87, 1, 88, 1, 89, 1, 90, 1, 
	91, 1, 93, 1, 94, 1, 95, 1, 
	96, 1, 97, 2, 1, 41, 2, 1, 
	52, 2, 1, 63, 2, 3, 10, 2, 
	3, 18, 2, 3, 22, 2, 3, 29, 
	2, 6, 5, 2, 7, 5, 2, 9, 
	42, 2, 10, 43, 2, 14, 13, 2, 
	17, 53, 2, 18, 54, 2, 21, 64, 
	2, 22, 65, 2, 28, 74, 2, 29, 
	75, 2, 30, 81, 2, 33, 85, 2, 
	37, 92, 2, 40, 29, 2, 40, 37, 
	3, 6, 5, 2, 3, 7, 5, 2, 
	3, 14, 13, 3, 4, 6, 5, 1, 
	41, 4, 6, 5, 1, 52, 4, 6, 
	5, 1, 63, 4, 7, 5, 1, 41, 
	4, 7, 5, 1, 52, 4, 7, 5, 
	1, 63, 4, 40, 0, 2, 10, 4, 
	40, 0, 2, 18, 4, 40, 0, 2, 
	22, 5, 2, 25, 13, 26, 72, 5, 
	4, 2, 19, 62, 1, 6, 2, 23, 
	13, 24, 71, 29, 6, 40, 4, 2, 
	15, 0, 18
};

static const char _nix_cond_offsets[] = {
	0, 0, 0, 0, 1, 2, 2, 2, 
	3, 4, 4, 4, 4, 5, 6, 6, 
	6, 7, 8, 8, 8, 8, 9, 10, 
	10, 10, 11, 12, 12, 12, 12, 13, 
	14, 15, 15, 15, 15, 15, 15, 15, 
	15, 16, 16, 17, 17, 18, 18, 18, 
	18, 18, 19, 19, 20, 20, 21, 21, 
	22, 22, 23, 23, 24, 24, 25, 25, 
	25, 25, 25, 25, 25, 25, 25, 25, 
	25, 25
};

static const char _nix_cond_lengths[] = {
	0, 0, 0, 1, 1, 0, 0, 1, 
	1, 0, 0, 0, 1, 1, 0, 0, 
	1, 1, 0, 0, 0, 1, 1, 0, 
	0, 1, 1, 0, 0, 0, 1, 1, 
	1, 0, 0, 0, 0, 0, 0, 0, 
	1, 0, 1, 0, 1, 0, 0, 0, 
	0, 1, 0, 1, 0, 1, 0, 1, 
	0, 1, 0, 1, 0, 1, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0
};

static const short _nix_cond_keys[] = {
	13, 13, 13, 13, 13, 13, 13, 13, 
	13, 13, 13, 13, 13, 13, 13, 13, 
	13, 13, 13, 13, 13, 13, 13, 13, 
	13, 13, 13, 13, 13, 13, 13, 13, 
	13, 13, 13, 13, 13, 13, 13, 13, 
	13, 13, 13, 13, 13, 13, 13, 13, 
	13, 13, 0
};

static const char _nix_cond_spaces[] = {
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0
};

static const short _nix_key_offsets[] = {
	0, 0, 1, 3, 15, 27, 30, 31, 
	43, 55, 58, 59, 60, 72, 84, 87, 
	88, 100, 112, 115, 116, 117, 129, 141, 
	144, 145, 157, 169, 172, 173, 174, 185, 
	196, 208, 209, 210, 217, 220, 223, 224, 
	225, 238, 240, 252, 255, 267, 268, 272, 
	275, 278, 291, 293, 305, 308, 320, 321, 
	334, 336, 348, 351, 363, 364, 378, 380, 
	383, 384, 385, 386, 391, 394, 397, 402, 
	405, 408
};

static const short _nix_trans_keys[] = {
	42, 42, 47, 9, 10, 12, 32, 34, 
	92, 269, 525, -128, 11, 14, 127, 9, 
	10, 12, 32, 34, 92, 269, 525, -128, 
	11, 14, 127, 10, 12, 13, 10, 9, 
	10, 12, 32, 39, 92, 269, 525, -128, 
	11, 14, 127, 9, 10, 12, 32, 39, 
	92, 269, 525, -128, 11, 14, 127, 10, 
	12, 13, 10, 10, 9, 10, 12, 32, 
	34, 92, 269, 525, -128, 11, 14, 127, 
	9, 10, 12, 32, 34, 92, 269, 525, 
	-128, 11, 14, 127, 10, 12, 13, 10, 
	9, 10, 12, 32, 39, 92, 269, 525, 
	-128, 11, 14, 127, 9, 10, 12, 32, 
	39, 92, 269, 525, -128, 11, 14, 127, 
	10, 12, 13, 10, 10, 9, 10, 12, 
	32, 34, 92, 269, 525, -128, 11, 14, 
	127, 9, 10, 12, 32, 34, 92, 269, 
	525, -128, 11, 14, 127, 10, 12, 13, 
	10, 9, 10, 12, 32, 39, 92, 269, 
	525, -128, 11, 14, 127, 9, 10, 12, 
	32, 39, 92, 269, 525, -128, 11, 14, 
	127, 10, 12, 13, 10, 10, 9, 10, 
	12, 32, 42, 269, 525, -128, 11, 14, 
	127, 9, 10, 12, 32, 42, 269, 525, 
	-128, 11, 14, 127, 9, 10, 12, 32, 
	42, 47, 269, 525, -128, 11, 14, 127, 
	10, 10, 32, 34, 35, 39, 47, 9, 
	13, 32, 9, 13, 10, 12, 13, 39, 
	42, 9, 10, 12, 32, 34, 35, 39, 
	269, 525, -128, 8, 14, 127, 9, 32, 
	9, 10, 12, 32, 34, 92, 269, 525, 
	-128, 11, 14, 127, 10, 12, 13, 9, 
	10, 12, 32, 39, 92, 269, 525, -128, 
	11, 14, 127, 10, 32, 35, 9, 13, 
	32, 9, 13, 10, 12, 13, 9, 10, 
	12, 32, 34, 35, 39, 269, 525, -128, 
	8, 14, 127, 9, 32, 9, 10, 12, 
	32, 34, 92, 269, 525, -128, 11, 14, 
	127, 10, 12, 13, 9, 10, 12, 32, 
	39, 92, 269, 525, -128, 11, 14, 127, 
	10, 9, 10, 12, 32, 34, 35, 39, 
	269, 525, -128, 8, 14, 127, 9, 32, 
	9, 10, 12, 32, 34, 92, 269, 525, 
	-128, 11, 14, 127, 10, 12, 13, 9, 
	10, 12, 32, 39, 92, 269, 525, -128, 
	11, 14, 127, 10, 9, 10, 12, 32, 
	34, 35, 39, 47, 269, 525, -128, 8, 
	14, 127, 9, 32, 10, 12, 13, 39, 
	42, 10, 32, 34, 35, 9, 13, 32, 
	9, 13, 10, 12, 13, 32, 35, 39, 
	9, 13, 32, 9, 13, 10, 12, 13, 
	39, 0
};

static const char _nix_single_lengths[] = {
	0, 1, 2, 8, 8, 1, 1, 8, 
	8, 1, 1, 1, 8, 8, 1, 1, 
	8, 8, 1, 1, 1, 8, 8, 1, 
	1, 8, 8, 1, 1, 1, 7, 7, 
	8, 1, 1, 5, 1, 1, 1, 1, 
	9, 2, 8, 1, 8, 1, 2, 1, 
	1, 9, 2, 8, 1, 8, 1, 9, 
	2, 8, 1, 8, 1, 10, 2, 1, 
	1, 1, 1, 3, 1, 1, 3, 1, 
	1, 1
};

static const char _nix_range_lengths[] = {
	0, 0, 0, 2, 2, 1, 0, 2, 
	2, 1, 0, 0, 2, 2, 1, 0, 
	2, 2, 1, 0, 0, 2, 2, 1, 
	0, 2, 2, 1, 0, 0, 2, 2, 
	2, 0, 0, 1, 1, 1, 0, 0, 
	2, 0, 2, 1, 2, 0, 1, 1, 
	1, 2, 0, 2, 1, 2, 0, 2, 
	0, 2, 1, 2, 0, 2, 0, 1, 
	0, 0, 0, 1, 1, 1, 1, 1, 
	1, 0
};

static const short _nix_index_offsets[] = {
	0, 0, 2, 5, 16, 27, 30, 32, 
	43, 54, 57, 59, 61, 72, 83, 86, 
	88, 99, 110, 113, 115, 117, 128, 139, 
	142, 144, 155, 166, 169, 171, 173, 183, 
	193, 204, 206, 208, 215, 218, 221, 223, 
	225, 237, 240, 251, 254, 265, 267, 271, 
	274, 277, 289, 292, 303, 306, 317, 319, 
	331, 334, 345, 348, 359, 361, 374, 377, 
	380, 382, 384, 386, 391, 394, 397, 402, 
	405, 408
};

static const unsigned char _nix_indicies[] = {
	2, 1, 2, 3, 1, 6, 7, 7, 
	6, 8, 9, 10, 7, 5, 5, 4, 
	12, 13, 13, 12, 14, 15, 16, 13, 
	11, 11, 4, 4, 4, 5, 7, 4, 
	18, 19, 19, 18, 8, 20, 21, 19, 
	17, 17, 4, 23, 24, 24, 23, 25, 
	26, 27, 24, 22, 22, 4, 4, 4, 
	17, 19, 4, 28, 29, 32, 33, 33, 
	32, 34, 35, 36, 33, 31, 31, 30, 
	38, 39, 39, 38, 40, 41, 42, 39, 
	37, 37, 30, 30, 30, 31, 33, 30, 
	45, 46, 46, 45, 34, 47, 48, 46, 
	44, 44, 43, 50, 51, 51, 50, 52, 
	53, 54, 51, 49, 49, 43, 43, 43, 
	44, 46, 43, 55, 29, 58, 59, 59, 
	58, 60, 61, 62, 59, 57, 57, 56, 
	64, 65, 65, 64, 66, 67, 68, 65, 
	63, 63, 56, 56, 56, 57, 59, 56, 
	70, 71, 71, 70, 60, 72, 73, 71, 
	69, 69, 56, 75, 76, 76, 75, 77, 
	78, 79, 76, 74, 74, 56, 56, 56, 
	69, 71, 56, 80, 29, 83, 84, 84, 
	83, 85, 86, 84, 82, 82, 81, 88, 
	89, 89, 88, 90, 91, 89, 87, 87, 
	81, 83, 84, 84, 83, 85, 92, 86, 
	84, 82, 82, 81, 84, 81, 93, 29, 
	95, 96, 97, 98, 99, 95, 94, 95, 
	95, 100, 101, 101, 97, 103, 102, 1, 
	102, 105, 28, 28, 105, 106, 107, 108, 
	109, 110, 104, 104, 29, 105, 105, 111, 
	6, 7, 7, 6, 8, 9, 10, 7, 
	5, 5, 112, 113, 113, 114, 18, 19, 
	19, 18, 8, 20, 21, 19, 17, 17, 
	112, 28, 115, 117, 118, 117, 116, 117, 
	117, 119, 120, 120, 118, 122, 55, 55, 
	122, 123, 124, 125, 126, 127, 121, 121, 
	29, 122, 122, 128, 32, 33, 33, 32, 
	34, 35, 36, 33, 31, 31, 129, 130, 
	130, 131, 45, 46, 46, 45, 34, 47, 
	48, 46, 44, 44, 132, 55, 133, 135, 
	80, 80, 135, 136, 137, 138, 139, 140, 
	134, 134, 29, 135, 135, 141, 58, 59, 
	59, 58, 60, 61, 62, 59, 57, 57, 
	142, 143, 143, 144, 70, 71, 71, 70, 
	145, 72, 73, 71, 69, 69, 142, 80, 
	146, 148, 93, 93, 148, 149, 150, 151, 
	152, 153, 154, 147, 147, 29, 148, 148, 
	155, 156, 156, 157, 159, 158, 82, 158, 
	93, 160, 162, 163, 164, 162, 161, 162, 
	162, 165, 166, 166, 164, 168, 169, 170, 
	168, 167, 168, 168, 171, 172, 172, 169, 
	174, 173, 0
};

static const char _nix_trans_targs[] = {
	35, 1, 2, 35, 40, 3, 3, 4, 
	40, 5, 6, 3, 3, 4, 40, 5, 
	6, 7, 7, 8, 9, 10, 7, 7, 
	8, 40, 9, 10, 40, 0, 49, 12, 
	12, 13, 49, 14, 15, 12, 12, 13, 
	49, 14, 15, 49, 16, 16, 17, 18, 
	19, 16, 16, 17, 49, 18, 19, 49, 
	55, 21, 21, 22, 55, 23, 24, 21, 
	21, 22, 55, 23, 24, 25, 25, 26, 
	27, 28, 25, 25, 26, 55, 27, 28, 
	55, 61, 30, 30, 31, 32, 33, 30, 
	30, 31, 32, 33, 61, 61, 35, 36, 
	35, 37, 38, 39, 35, 35, 35, 35, 
	40, 41, 42, 43, 44, 11, 45, 40, 
	40, 40, 43, 40, 46, 47, 48, 46, 
	46, 49, 50, 51, 52, 53, 20, 54, 
	49, 49, 49, 52, 49, 49, 55, 56, 
	57, 58, 59, 29, 60, 55, 55, 55, 
	58, 55, 55, 61, 62, 61, 63, 64, 
	65, 34, 66, 61, 61, 63, 61, 61, 
	61, 67, 68, 67, 69, 67, 67, 70, 
	71, 72, 73, 70, 70, 70, 70
};

static const short _nix_trans_actions[] = {
	121, 37, 37, 183, 51, 1, 0, 0, 
	123, 0, 0, 196, 147, 147, 219, 147, 
	147, 1, 0, 0, 0, 0, 192, 144, 
	144, 204, 144, 144, 150, 0, 69, 1, 
	0, 0, 126, 0, 0, 196, 147, 147, 
	224, 147, 147, 71, 1, 0, 0, 0, 
	0, 192, 144, 144, 209, 144, 144, 159, 
	81, 1, 0, 0, 129, 0, 0, 196, 
	147, 147, 229, 147, 147, 1, 0, 0, 
	0, 0, 192, 144, 144, 214, 144, 144, 
	165, 93, 3, 0, 0, 3, 0, 200, 
	156, 156, 200, 156, 83, 171, 113, 35, 
	109, 37, 0, 189, 115, 117, 119, 111, 
	153, 5, 234, 132, 234, 7, 7, 43, 
	49, 45, 0, 47, 53, 9, 11, 55, 
	57, 162, 13, 268, 135, 239, 15, 15, 
	61, 59, 63, 0, 67, 65, 168, 17, 
	244, 138, 244, 19, 19, 73, 79, 75, 
	0, 255, 77, 174, 21, 261, 141, 25, 
	186, 23, 23, 85, 87, 0, 91, 249, 
	89, 95, 27, 177, 29, 97, 99, 101, 
	31, 33, 0, 103, 105, 107, 180
};

static const short _nix_to_state_actions[] = {
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 39, 0, 0, 0, 0, 
	39, 0, 0, 0, 0, 0, 39, 0, 
	0, 39, 0, 0, 0, 0, 0, 39, 
	0, 0, 0, 0, 0, 39, 0, 0, 
	0, 0, 0, 39, 0, 0, 39, 0, 
	0, 0
};

static const short _nix_from_state_actions[] = {
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 0, 0, 0, 0, 0, 
	0, 0, 0, 41, 0, 0, 0, 0, 
	41, 0, 0, 0, 0, 0, 41, 0, 
	0, 41, 0, 0, 0, 0, 0, 41, 
	0, 0, 0, 0, 0, 41, 0, 0, 
	0, 0, 0, 41, 0, 0, 41, 0, 
	0, 0
};

static const short _nix_eof_trans[] = {
	0, 1, 1, 5, 5, 5, 5, 5, 
	5, 5, 5, 0, 31, 31, 31, 31, 
	44, 44, 44, 44, 0, 57, 57, 57, 
	57, 57, 57, 57, 57, 0, 82, 82, 
	82, 82, 0, 0, 101, 102, 103, 103, 
	0, 112, 113, 114, 113, 116, 0, 120, 
	121, 0, 129, 130, 131, 133, 134, 0, 
	142, 143, 144, 143, 147, 0, 156, 157, 
	159, 159, 161, 0, 166, 167, 0, 172, 
	173, 174
};

static const int nix_start = 35;
static const int nix_first_final = 35;
static const int nix_error = 0;

static const int nix_en_shell_line = 40;
static const int nix_en_shell_entity = 46;
static const int nix_en_nix_dq_shell_line = 49;
static const int nix_en_nix_dsq_shell_line = 55;
static const int nix_en_nix_line = 61;
static const int nix_en_nix_dq_shell_entity = 67;
static const int nix_en_nix_dsq_shell_entity = 70;
static const int nix_en_nix_entity = 35;

#line 28 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"

#line 212 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"


/************************* Required for every parser *************************/

/* Parses a string buffer with Nix code.
 *
 * @param *buffer The string to parse.
 * @param length The length of the string to parse.
 * @param count Integer flag specifying whether or not to count lines. If yes,
 *   uses the Ragel machine optimized for counting. Otherwise uses the Ragel
 *   machine optimized for returning entity positions.
 * @param *callback Callback function. If count is set, callback is called for
 *   every line of code, comment, or blank with 'lcode', 'lcomment', and
 *   'lblank' respectively. Otherwise callback is called for each entity found.
 */
void parse_nix(char *buffer, int length, int count,
  void (*callback) (const char *lang, const char *entity, int start, int end)
  ) {
  init

  
#line 397 "ext/ohcount_native/ragel_parsers/nix.h"
	{
	cs = nix_start;
	top = 0;
	ts = 0;
	te = 0;
	act = 0;
	}
#line 233 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
  cs = (count) ? nix_en_nix_line : nix_en_nix_entity;
  
#line 408 "ext/ohcount_native/ragel_parsers/nix.h"
	{
	int _klen;
	unsigned int _trans;
	short _widec;
	const char *_acts;
	unsigned int _nacts;
	const short *_keys;

	if ( p == pe )
		goto _test_eof;
	if ( cs == 0 )
		goto _out;
_resume:
	_acts = _nix_actions + _nix_from_state_actions[cs];
	_nacts = (unsigned int) *_acts++;
	while ( _nacts-- > 0 ) {
		switch ( *_acts++ ) {
	case 39:
#line 1 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ts = p;}
	break;
#line 430 "ext/ohcount_native/ragel_parsers/nix.h"
		}
	}

	_widec = (*p);
	_klen = _nix_cond_lengths[cs];
	_keys = _nix_cond_keys + (_nix_cond_offsets[cs]*2);
	if ( _klen > 0 ) {
		const short *_lower = _keys;
		const short *_mid;
		const short *_upper = _keys + (_klen<<1) - 2;
		while (1) {
			if ( _upper < _lower )
				break;

			_mid = _lower + (((_upper-_lower) >> 1) & ~1);
			if ( _widec < _mid[0] )
				_upper = _mid - 2;
			else if ( _widec > _mid[1] )
				_lower = _mid + 2;
			else {
				switch ( _nix_cond_spaces[_nix_cond_offsets[cs] + ((_mid - _keys)>>1)] ) {
	case 0: {
		_widec = (short)(128 + ((*p) - -128));
		if ( 
#line 9 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
 p+1 < pe && *(p+1) != '\n'  ) _widec += 256;
		break;
	}
				}
				break;
			}
		}
	}

	_keys = _nix_trans_keys + _nix_key_offsets[cs];
	_trans = _nix_index_offsets[cs];

	_klen = _nix_single_lengths[cs];
	if ( _klen > 0 ) {
		const short *_lower = _keys;
		const short *_mid;
		const short *_upper = _keys + _klen - 1;
		while (1) {
			if ( _upper < _lower )
				break;

			_mid = _lower + ((_upper-_lower) >> 1);
			if ( _widec < *_mid )
				_upper = _mid - 1;
			else if ( _widec > *_mid )
				_lower = _mid + 1;
			else {
				_trans += (_mid - _keys);
				goto _match;
			}
		}
		_keys += _klen;
		_trans += _klen;
	}

	_klen = _nix_range_lengths[cs];
	if ( _klen > 0 ) {
		const short *_lower = _keys;
		const short *_mid;
		const short *_upper = _keys + (_klen<<1) - 2;
		while (1) {
			if ( _upper < _lower )
				break;

			_mid = _lower + (((_upper-_lower) >> 1) & ~1);
			if ( _widec < _mid[0] )
				_upper = _mid - 2;
			else if ( _widec > _mid[1] )
				_lower = _mid + 2;
			else {
				_trans += ((_mid - _keys)>>1);
				goto _match;
			}
		}
		_trans += _klen;
	}

_match:
	_trans = _nix_indicies[_trans];
_eof_trans:
	cs = _nix_trans_targs[_trans];

	if ( _nix_trans_actions[_trans] == 0 )
		goto _again;

	_acts = _nix_actions + _nix_trans_actions[_trans];
	_nacts = (unsigned int) *_acts++;
	while ( _nacts-- > 0 )
	{
		switch ( *_acts++ )
		{
	case 0:
#line 30 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{
  inqueue = 1;
  if (callback_list_head) free_queue(); // free the current queue
  callback_list_head = NULL;
  callback_list_tail = NULL;
  // set backup variables
  last_line_start = line_start;
  last_line_contains_code = line_contains_code;
  last_whole_line_comment = whole_line_comment;
}
	break;
	case 1:
#line 41 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{
  if (inqueue) {
    Callback *item;
    for (item = callback_list_head; item != NULL; item = item->next)
      callback(item->lang, item->entity, item->s, item->e);
    free_queue();
    inqueue = 0;
  }
}
	break;
	case 2:
#line 53 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{
  if (!line_contains_code && !line_start) line_start = ts;
  line_contains_code = 1;
}
	break;
	case 3:
#line 58 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{
  if (!line_contains_code) {
    whole_line_comment = 1;
    if (!line_start) line_start = ts;
  }
}
	break;
	case 4:
#line 65 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{
  if (!line_contains_code && !whole_line_comment) seen = 0;
}
	break;
	case 5:
#line 32 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{
    switch(entity) {
    case SHELL_SPACE:
      ls
      break;
    case SHELL_ANY:
      code
      break;
    case INTERNAL_NL:
      std_internal_newline(SHELL_LANG)
      break;
    case NEWLINE:
      std_newline(SHELL_LANG)
    }
  }
	break;
	case 6:
#line 52 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ entity = INTERNAL_NL; }
	break;
	case 7:
#line 62 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ entity = INTERNAL_NL; }
	break;
	case 8:
#line 74 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ entity = SHELL_SPACE; }
	break;
	case 9:
#line 77 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ entity = NEWLINE;     }
	break;
	case 10:
#line 78 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ entity = SHELL_ANY;   }
	break;
	case 11:
#line 90 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ entity = SHELL_SPACE;   }
	break;
	case 12:
#line 91 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ entity = SHELL_COMMENT; }
	break;
	case 13:
#line 99 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{
    switch(entity) {
    case NIX_SPACE:
      ls
      break;
    case NIX_ANY:
      code
      break;
    case INTERNAL_NL:
      std_internal_newline(NIX_LANG)
      break;
    case NEWLINE:
      std_newline(NIX_LANG)
      break;
    case CHECK_BLANK_ENTRY:
      check_blank_entry(NIX_LANG)
    }
  }
	break;
	case 14:
#line 122 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ entity = INTERNAL_NL; }
	break;
	case 15:
#line 134 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ p = ts; {cs = stack[--top]; goto _again;} }
	break;
	case 16:
#line 137 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ entity = SHELL_SPACE; }
	break;
	case 17:
#line 140 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ entity = NEWLINE;     }
	break;
	case 18:
#line 141 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ entity = SHELL_ANY;   }
	break;
	case 19:
#line 147 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ p = ts; {cs = stack[--top]; goto _again;} }
	break;
	case 20:
#line 150 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ entity = SHELL_SPACE; }
	break;
	case 21:
#line 153 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ entity = NEWLINE;     }
	break;
	case 22:
#line 154 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ entity = SHELL_ANY;   }
	break;
	case 23:
#line 158 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ entity = CHECK_BLANK_ENTRY; }
	break;
	case 24:
#line 159 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ saw(SHELL_LANG); }
	break;
	case 25:
#line 160 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ entity = CHECK_BLANK_ENTRY; }
	break;
	case 26:
#line 161 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ saw(SHELL_LANG); }
	break;
	case 27:
#line 163 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ entity = NIX_SPACE; }
	break;
	case 28:
#line 165 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ entity = NEWLINE; }
	break;
	case 29:
#line 166 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ entity = NIX_ANY;   }
	break;
	case 30:
#line 183 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ {cs = stack[--top]; goto _again;} }
	break;
	case 31:
#line 186 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ entity = SHELL_SPACE;   }
	break;
	case 32:
#line 187 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ entity = SHELL_COMMENT; }
	break;
	case 33:
#line 195 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ {cs = stack[--top]; goto _again;} }
	break;
	case 34:
#line 198 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ entity = SHELL_SPACE;   }
	break;
	case 35:
#line 199 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ entity = SHELL_COMMENT; }
	break;
	case 36:
#line 207 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ entity = NIX_SPACE;   }
	break;
	case 37:
#line 208 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ entity = NIX_COMMENT; }
	break;
	case 40:
#line 1 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p+1;}
	break;
	case 41:
#line 76 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p+1;}
	break;
	case 42:
#line 32 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p+1;{
    switch(entity) {
    case SHELL_SPACE:
      ls
      break;
    case SHELL_ANY:
      code
      break;
    case INTERNAL_NL:
      std_internal_newline(SHELL_LANG)
      break;
    case NEWLINE:
      std_newline(SHELL_LANG)
    }
  }}
	break;
	case 43:
#line 32 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p+1;{
    switch(entity) {
    case SHELL_SPACE:
      ls
      break;
    case SHELL_ANY:
      code
      break;
    case INTERNAL_NL:
      std_internal_newline(SHELL_LANG)
      break;
    case NEWLINE:
      std_newline(SHELL_LANG)
    }
  }}
	break;
	case 44:
#line 32 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p;p--;{
    switch(entity) {
    case SHELL_SPACE:
      ls
      break;
    case SHELL_ANY:
      code
      break;
    case INTERNAL_NL:
      std_internal_newline(SHELL_LANG)
      break;
    case NEWLINE:
      std_newline(SHELL_LANG)
    }
  }}
	break;
	case 45:
#line 75 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p;p--;}
	break;
	case 46:
#line 32 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p;p--;{
    switch(entity) {
    case SHELL_SPACE:
      ls
      break;
    case SHELL_ANY:
      code
      break;
    case INTERNAL_NL:
      std_internal_newline(SHELL_LANG)
      break;
    case NEWLINE:
      std_newline(SHELL_LANG)
    }
  }}
	break;
	case 47:
#line 32 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p;p--;{
    switch(entity) {
    case SHELL_SPACE:
      ls
      break;
    case SHELL_ANY:
      code
      break;
    case INTERNAL_NL:
      std_internal_newline(SHELL_LANG)
      break;
    case NEWLINE:
      std_newline(SHELL_LANG)
    }
  }}
	break;
	case 48:
#line 32 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{{p = ((te))-1;}{
    switch(entity) {
    case SHELL_SPACE:
      ls
      break;
    case SHELL_ANY:
      code
      break;
    case INTERNAL_NL:
      std_internal_newline(SHELL_LANG)
      break;
    case NEWLINE:
      std_newline(SHELL_LANG)
    }
  }}
	break;
	case 49:
#line 93 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p+1;}
	break;
	case 50:
#line 83 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p;p--;{
    callback(SHELL_LANG, shell_entities[entity], cint(ts), cint(te));
  }}
	break;
	case 51:
#line 83 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p;p--;{
    callback(SHELL_LANG, shell_entities[entity], cint(ts), cint(te));
  }}
	break;
	case 52:
#line 139 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p+1;}
	break;
	case 53:
#line 32 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p+1;{
    switch(entity) {
    case SHELL_SPACE:
      ls
      break;
    case SHELL_ANY:
      code
      break;
    case INTERNAL_NL:
      std_internal_newline(SHELL_LANG)
      break;
    case NEWLINE:
      std_newline(SHELL_LANG)
    }
  }}
	break;
	case 54:
#line 32 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p+1;{
    switch(entity) {
    case SHELL_SPACE:
      ls
      break;
    case SHELL_ANY:
      code
      break;
    case INTERNAL_NL:
      std_internal_newline(SHELL_LANG)
      break;
    case NEWLINE:
      std_newline(SHELL_LANG)
    }
  }}
	break;
	case 55:
#line 134 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p;p--;}
	break;
	case 56:
#line 32 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p;p--;{
    switch(entity) {
    case SHELL_SPACE:
      ls
      break;
    case SHELL_ANY:
      code
      break;
    case INTERNAL_NL:
      std_internal_newline(SHELL_LANG)
      break;
    case NEWLINE:
      std_newline(SHELL_LANG)
    }
  }}
	break;
	case 57:
#line 138 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p;p--;}
	break;
	case 58:
#line 32 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p;p--;{
    switch(entity) {
    case SHELL_SPACE:
      ls
      break;
    case SHELL_ANY:
      code
      break;
    case INTERNAL_NL:
      std_internal_newline(SHELL_LANG)
      break;
    case NEWLINE:
      std_newline(SHELL_LANG)
    }
  }}
	break;
	case 59:
#line 32 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p;p--;{
    switch(entity) {
    case SHELL_SPACE:
      ls
      break;
    case SHELL_ANY:
      code
      break;
    case INTERNAL_NL:
      std_internal_newline(SHELL_LANG)
      break;
    case NEWLINE:
      std_newline(SHELL_LANG)
    }
  }}
	break;
	case 60:
#line 134 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{{p = ((te))-1;}}
	break;
	case 61:
#line 32 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{{p = ((te))-1;}{
    switch(entity) {
    case SHELL_SPACE:
      ls
      break;
    case SHELL_ANY:
      code
      break;
    case INTERNAL_NL:
      std_internal_newline(SHELL_LANG)
      break;
    case NEWLINE:
      std_newline(SHELL_LANG)
    }
  }}
	break;
	case 62:
#line 147 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p+1;}
	break;
	case 63:
#line 152 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p+1;}
	break;
	case 64:
#line 32 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p+1;{
    switch(entity) {
    case SHELL_SPACE:
      ls
      break;
    case SHELL_ANY:
      code
      break;
    case INTERNAL_NL:
      std_internal_newline(SHELL_LANG)
      break;
    case NEWLINE:
      std_newline(SHELL_LANG)
    }
  }}
	break;
	case 65:
#line 32 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p+1;{
    switch(entity) {
    case SHELL_SPACE:
      ls
      break;
    case SHELL_ANY:
      code
      break;
    case INTERNAL_NL:
      std_internal_newline(SHELL_LANG)
      break;
    case NEWLINE:
      std_newline(SHELL_LANG)
    }
  }}
	break;
	case 66:
#line 32 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p;p--;{
    switch(entity) {
    case SHELL_SPACE:
      ls
      break;
    case SHELL_ANY:
      code
      break;
    case INTERNAL_NL:
      std_internal_newline(SHELL_LANG)
      break;
    case NEWLINE:
      std_newline(SHELL_LANG)
    }
  }}
	break;
	case 67:
#line 151 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p;p--;}
	break;
	case 68:
#line 32 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p;p--;{
    switch(entity) {
    case SHELL_SPACE:
      ls
      break;
    case SHELL_ANY:
      code
      break;
    case INTERNAL_NL:
      std_internal_newline(SHELL_LANG)
      break;
    case NEWLINE:
      std_newline(SHELL_LANG)
    }
  }}
	break;
	case 69:
#line 32 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p;p--;{
    switch(entity) {
    case SHELL_SPACE:
      ls
      break;
    case SHELL_ANY:
      code
      break;
    case INTERNAL_NL:
      std_internal_newline(SHELL_LANG)
      break;
    case NEWLINE:
      std_newline(SHELL_LANG)
    }
  }}
	break;
	case 70:
#line 32 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{{p = ((te))-1;}{
    switch(entity) {
    case SHELL_SPACE:
      ls
      break;
    case SHELL_ANY:
      code
      break;
    case INTERNAL_NL:
      std_internal_newline(SHELL_LANG)
      break;
    case NEWLINE:
      std_newline(SHELL_LANG)
    }
  }}
	break;
	case 71:
#line 159 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p+1;{ {stack[top++] = cs; cs = 49; goto _again;} }}
	break;
	case 72:
#line 161 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p+1;{ {stack[top++] = cs; cs = 55; goto _again;} }}
	break;
	case 73:
#line 164 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p+1;}
	break;
	case 74:
#line 99 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p+1;{
    switch(entity) {
    case NIX_SPACE:
      ls
      break;
    case NIX_ANY:
      code
      break;
    case INTERNAL_NL:
      std_internal_newline(NIX_LANG)
      break;
    case NEWLINE:
      std_newline(NIX_LANG)
      break;
    case CHECK_BLANK_ENTRY:
      check_blank_entry(NIX_LANG)
    }
  }}
	break;
	case 75:
#line 99 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p+1;{
    switch(entity) {
    case NIX_SPACE:
      ls
      break;
    case NIX_ANY:
      code
      break;
    case INTERNAL_NL:
      std_internal_newline(NIX_LANG)
      break;
    case NEWLINE:
      std_newline(NIX_LANG)
      break;
    case CHECK_BLANK_ENTRY:
      check_blank_entry(NIX_LANG)
    }
  }}
	break;
	case 76:
#line 99 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p;p--;{
    switch(entity) {
    case NIX_SPACE:
      ls
      break;
    case NIX_ANY:
      code
      break;
    case INTERNAL_NL:
      std_internal_newline(NIX_LANG)
      break;
    case NEWLINE:
      std_newline(NIX_LANG)
      break;
    case CHECK_BLANK_ENTRY:
      check_blank_entry(NIX_LANG)
    }
  }}
	break;
	case 77:
#line 164 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p;p--;}
	break;
	case 78:
#line 99 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p;p--;{
    switch(entity) {
    case NIX_SPACE:
      ls
      break;
    case NIX_ANY:
      code
      break;
    case INTERNAL_NL:
      std_internal_newline(NIX_LANG)
      break;
    case NEWLINE:
      std_newline(NIX_LANG)
      break;
    case CHECK_BLANK_ENTRY:
      check_blank_entry(NIX_LANG)
    }
  }}
	break;
	case 79:
#line 99 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p;p--;{
    switch(entity) {
    case NIX_SPACE:
      ls
      break;
    case NIX_ANY:
      code
      break;
    case INTERNAL_NL:
      std_internal_newline(NIX_LANG)
      break;
    case NEWLINE:
      std_newline(NIX_LANG)
      break;
    case CHECK_BLANK_ENTRY:
      check_blank_entry(NIX_LANG)
    }
  }}
	break;
	case 80:
#line 99 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{{p = ((te))-1;}{
    switch(entity) {
    case NIX_SPACE:
      ls
      break;
    case NIX_ANY:
      code
      break;
    case INTERNAL_NL:
      std_internal_newline(NIX_LANG)
      break;
    case NEWLINE:
      std_newline(NIX_LANG)
      break;
    case CHECK_BLANK_ENTRY:
      check_blank_entry(NIX_LANG)
    }
  }}
	break;
	case 81:
#line 183 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p+1;}
	break;
	case 82:
#line 189 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p+1;}
	break;
	case 83:
#line 83 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p;p--;{
    callback(SHELL_LANG, shell_entities[entity], cint(ts), cint(te));
  }}
	break;
	case 84:
#line 83 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p;p--;{
    callback(SHELL_LANG, shell_entities[entity], cint(ts), cint(te));
  }}
	break;
	case 85:
#line 195 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p+1;}
	break;
	case 86:
#line 201 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p+1;}
	break;
	case 87:
#line 83 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p;p--;{
    callback(SHELL_LANG, shell_entities[entity], cint(ts), cint(te));
  }}
	break;
	case 88:
#line 83 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p;p--;{
    callback(SHELL_LANG, shell_entities[entity], cint(ts), cint(te));
  }}
	break;
	case 89:
#line 201 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p;p--;}
	break;
	case 90:
#line 205 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p+1;{ {stack[top++] = cs; cs = 67; goto _again;}  }}
	break;
	case 91:
#line 206 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p+1;{ {stack[top++] = cs; cs = 70; goto _again;} }}
	break;
	case 92:
#line 171 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p+1;{
    callback(NIX_LANG, nix_entities[entity], cint(ts), cint(te));
  }}
	break;
	case 93:
#line 210 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p+1;}
	break;
	case 94:
#line 171 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p;p--;{
    callback(NIX_LANG, nix_entities[entity], cint(ts), cint(te));
  }}
	break;
	case 95:
#line 171 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p;p--;{
    callback(NIX_LANG, nix_entities[entity], cint(ts), cint(te));
  }}
	break;
	case 96:
#line 210 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{te = p;p--;}
	break;
	case 97:
#line 210 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{{p = ((te))-1;}}
	break;
#line 1341 "ext/ohcount_native/ragel_parsers/nix.h"
		}
	}

_again:
	_acts = _nix_actions + _nix_to_state_actions[cs];
	_nacts = (unsigned int) *_acts++;
	while ( _nacts-- > 0 ) {
		switch ( *_acts++ ) {
	case 38:
#line 1 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"
	{ts = 0;}
	break;
#line 1354 "ext/ohcount_native/ragel_parsers/nix.h"
		}
	}

	if ( cs == 0 )
		goto _out;
	if ( ++p != pe )
		goto _resume;
	_test_eof: {}
	if ( p == eof )
	{
	if ( _nix_eof_trans[cs] > 0 ) {
		_trans = _nix_eof_trans[cs] - 1;
		goto _eof_trans;
	}
	}

	_out: {}
	}
#line 235 "ext/ohcount_native/ragel_parsers/nix.rl.tmp"

  // if no newline at EOF; callback contents of last line
  if (count) { process_last_line(NIX_LANG) }
}

#endif

/*****************************************************************************/
