let rec token lexbuf =
  __ocaml_lex_token_rec lexbuf 0
and __ocaml_lex_token_rec lexbuf __ocaml_lex_state =
  match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with
      | 0 ->
# 175 "cfLexer.mll"
                  ( buildInteger (CfParserUtil.next_lex lexbuf) )
# 2239 "cfLexer.ml"

  | 1 ->
# 176 "cfLexer.mll"
                  ( buildChar    (CfParserUtil.next_lex lexbuf) )
# 2244 "cfLexer.ml"

  | 2 ->
# 177 "cfLexer.mll"
                  ( buildFloat   (CfParserUtil.next_lex lexbuf) )
# 2249 "cfLexer.ml"

  | 3 ->
# 178 "cfLexer.mll"
                  ( CfParser.STRING                   (CfParserUtil.next_lex lexbuf) )
# 2254 "cfLexer.ml"

  | 4 ->
# 179 "cfLexer.mll"
                  ( buildVector  (CfParserUtil.next_lex lexbuf) )
# 2259 "cfLexer.ml"

  | 5 ->
# 180 "cfLexer.mll"
                  ( buildBoolean (CfParserUtil.next_lex lexbuf) )
# 2264 "cfLexer.ml"

  | 6 ->
# 181 "cfLexer.mll"
                  ( buildBoolean (CfParserUtil.next_lex lexbuf) )
# 2269 "cfLexer.ml"

  | 7 ->
# 182 "cfLexer.mll"
                  ( CfParser.FREE                     (CfParserUtil.next_lex lexbuf) )
# 2274 "cfLexer.ml"

  | 8 ->
# 183 "cfLexer.mll"
                  ( CfParser.END                      (CfParserUtil.next_lex lexbuf) )
# 2279 "cfLexer.ml"

  | 9 ->
# 184 "cfLexer.mll"
                  ( CfParser.COMPONENT                (CfParserUtil.next_lex lexbuf) )
# 2284 "cfLexer.ml"

  | 10 ->
# 185 "cfLexer.mll"
                  ( CfParser.COMP                     (CfParserUtil.next_lex lexbuf) )
# 2289 "cfLexer.ml"

  | 11 ->
# 186 "cfLexer.mll"
                  ( CfParser.PRIM                     (CfParserUtil.next_lex lexbuf) )
# 2294 "cfLexer.ml"

  | 12 ->
# 187 "cfLexer.mll"
                  ( CfParser.IF                       (CfParserUtil.next_lex lexbuf) )
# 2299 "cfLexer.ml"

  | 13 ->
# 188 "cfLexer.mll"
                  ( CfParser.EF                       (CfParserUtil.next_lex lexbuf) )
# 2304 "cfLexer.ml"

  | 14 ->
# 189 "cfLexer.mll"
                  ( CfParser.ELSE                     (CfParserUtil.next_lex lexbuf) )
# 2309 "cfLexer.ml"

  | 15 ->
# 190 "cfLexer.mll"
                  ( CfParser.WITH                     (CfParserUtil.next_lex lexbuf) )
# 2314 "cfLexer.ml"

  | 16 ->
# 191 "cfLexer.mll"
                  ( CfParser.IS                       (CfParserUtil.next_lex lexbuf) )
# 2319 "cfLexer.ml"

  | 17 ->
# 192 "cfLexer.mll"
                  ( CfParser.LOCAL                    (CfParserUtil.next_lex lexbuf) )
# 2324 "cfLexer.ml"

  | 18 ->
# 193 "cfLexer.mll"
                  ( CfParser.IMPORT                   (CfParserUtil.next_lex lexbuf) )
# 2329 "cfLexer.ml"

  | 19 ->
# 194 "cfLexer.mll"
                  ( CfParser.ENVIRONMENT              (CfParserUtil.next_lex lexbuf) )
# 2334 "cfLexer.ml"

  | 20 ->
# 195 "cfLexer.mll"
                      ( CfParser.ROOTENVIRONMENT      (CfParserUtil.next_lex lexbuf) )
# 2339 "cfLexer.ml"

  | 21 ->
# 196 "cfLexer.mll"
                  ( let (l, _) = CfParserUtil.next_lex lexbuf in CfParser.STRING (l, "\"" ^ Loc.toString l ^ "\"") )
# 2344 "cfLexer.ml"

  | 22 ->
# 197 "cfLexer.mll"
                  ( CfParser.BRACE_LEFT               (CfParserUtil.next_lex lexbuf) )
# 2349 "cfLexer.ml"

  | 23 ->
# 198 "cfLexer.mll"
                  ( CfParser.BRACE_RIGHT              (CfParserUtil.next_lex lexbuf) )
# 2354 "cfLexer.ml"

  | 24 ->
# 199 "cfLexer.mll"
                  ( CfParser.PAREN_LEFT               (CfParserUtil.next_lex lexbuf) )
# 2359 "cfLexer.ml"

  | 25 ->
# 200 "cfLexer.mll"
                  ( CfParser.PAREN_RIGHT              (CfParserUtil.next_lex lexbuf) )
# 2364 "cfLexer.ml"

  | 26 ->
# 201 "cfLexer.mll"
                  ( CfParser.BRACKET_LEFT             (CfParserUtil.next_lex lexbuf) )
# 2369 "cfLexer.ml"

  | 27 ->
# 202 "cfLexer.mll"
                  ( CfParser.BRACKET_RIGHT            (CfParserUtil.next_lex lexbuf) )
# 2374 "cfLexer.ml"

  | 28 ->
# 203 "cfLexer.mll"
                  ( CfParser.DOLLAR                   (CfParserUtil.next_lex lexbuf) )
# 2379 "cfLexer.ml"

  | 29 ->
# 204 "cfLexer.mll"
                  ( CfParser.COLON                    (CfParserUtil.next_lex lexbuf) )
# 2384 "cfLexer.ml"

  | 30 ->
# 205 "cfLexer.mll"
                  ( CfParser.EOF                      (CfParserUtil.next_lex lexbuf) )
# 2389 "cfLexer.ml"

  | 31 ->
# 206 "cfLexer.mll"
                  ( let _ = CfParserUtil.next_lex lexbuf in incr commentDepth; comment lexbuf; token lexbuf )
# 2394 "cfLexer.ml"

  | 32 ->
# 207 "cfLexer.mll"
                  ( let _ = CfParserUtil.next_lex lexbuf in token lexbuf )
# 2399 "cfLexer.ml"

  | 33 ->
# 209 "cfLexer.mll"
              ( CfParser.OP_DOT                       (CfParserUtil.next_lex lexbuf) )
# 2404 "cfLexer.ml"

  | 34 ->
# 210 "cfLexer.mll"
              ( CfParser.OP_VEC_SELECT                (CfParserUtil.next_lex lexbuf) )
# 2409 "cfLexer.ml"

  | 35 ->
# 211 "cfLexer.mll"
              ( CfParser.OP_NOT                       (CfParserUtil.next_lex lexbuf) )
# 2414 "cfLexer.ml"

  | 36 ->
# 212 "cfLexer.mll"
              ( CfParser.OP_BW_NOT                    (CfParserUtil.next_lex lexbuf) )
# 2419 "cfLexer.ml"

  | 37 ->
# 213 "cfLexer.mll"
              ( CfParser.OP_HEAD                      (CfParserUtil.next_lex lexbuf) )
# 2424 "cfLexer.ml"

  | 38 ->
# 214 "cfLexer.mll"
              ( CfParser.OP_TAIL                      (CfParserUtil.next_lex lexbuf) )
# 2429 "cfLexer.ml"

  | 39 ->
# 215 "cfLexer.mll"
              ( CfParser.OP_LENGTH                    (CfParserUtil.next_lex lexbuf) )
# 2434 "cfLexer.ml"

  | 40 ->
# 216 "cfLexer.mll"
              ( CfParser.OP_WIDTH                     (CfParserUtil.next_lex lexbuf) )
# 2439 "cfLexer.ml"

  | 41 ->
# 217 "cfLexer.mll"
              ( CfParser.OP_VEC_NOT                   (CfParserUtil.next_lex lexbuf) )
# 2444 "cfLexer.ml"

  | 42 ->
# 218 "cfLexer.mll"
              ( CfParser.OP_VEC_MSB                   (CfParserUtil.next_lex lexbuf) )
# 2449 "cfLexer.ml"

  | 43 ->
# 219 "cfLexer.mll"
              ( CfParser.OP_VEC_MSBS                  (CfParserUtil.next_lex lexbuf) )
# 2454 "cfLexer.ml"

  | 44 ->
# 220 "cfLexer.mll"
              ( CfParser.OP_VEC_LSB                   (CfParserUtil.next_lex lexbuf) )
# 2459 "cfLexer.ml"

  | 45 ->
# 221 "cfLexer.mll"
              ( CfParser.OP_VEC_LSBS                  (CfParserUtil.next_lex lexbuf) )
# 2464 "cfLexer.ml"

  | 46 ->
# 222 "cfLexer.mll"
              ( CfParser.OP_PROP_NOT                  (CfParserUtil.next_lex lexbuf) )
# 2469 "cfLexer.ml"

  | 47 ->
# 223 "cfLexer.mll"
              ( CfParser.OP_PROP_X                    (CfParserUtil.next_lex lexbuf) )
# 2474 "cfLexer.ml"

  | 48 ->
# 224 "cfLexer.mll"
              ( CfParser.OP_POW                       (CfParserUtil.next_lex lexbuf) )
# 2479 "cfLexer.ml"

  | 49 ->
# 225 "cfLexer.mll"
              ( CfParser.OP_VEC_POW                   (CfParserUtil.next_lex lexbuf) )
# 2484 "cfLexer.ml"

  | 50 ->
# 226 "cfLexer.mll"
              ( CfParser.OP_MUL                       (CfParserUtil.next_lex lexbuf) )
# 2489 "cfLexer.ml"

  | 51 ->
# 227 "cfLexer.mll"
              ( CfParser.OP_DIV                       (CfParserUtil.next_lex lexbuf) )
# 2494 "cfLexer.ml"

  | 52 ->
# 228 "cfLexer.mll"
              ( CfParser.OP_MOD                       (CfParserUtil.next_lex lexbuf) )
# 2499 "cfLexer.ml"

  | 53 ->
# 229 "cfLexer.mll"
              ( CfParser.OP_VEC_MUL                   (CfParserUtil.next_lex lexbuf) )
# 2504 "cfLexer.ml"

  | 54 ->
# 230 "cfLexer.mll"
              ( CfParser.OP_VEC_DIV                   (CfParserUtil.next_lex lexbuf) )
# 2509 "cfLexer.ml"

  | 55 ->
# 231 "cfLexer.mll"
              ( CfParser.OP_VEC_MOD                   (CfParserUtil.next_lex lexbuf) )
# 2514 "cfLexer.ml"

  | 56 ->
# 232 "cfLexer.mll"
              ( CfParser.OP_VEC_MUL_S                 (CfParserUtil.next_lex lexbuf) )
# 2519 "cfLexer.ml"

  | 57 ->
# 233 "cfLexer.mll"
              ( CfParser.OP_ADD                       (CfParserUtil.next_lex lexbuf) )
# 2524 "cfLexer.ml"

  | 58 ->
# 234 "cfLexer.mll"
              ( CfParser.OP_SUB                       (CfParserUtil.next_lex lexbuf) )
# 2529 "cfLexer.ml"

  | 59 ->
# 235 "cfLexer.mll"
              ( CfParser.OP_VEC_ADD                   (CfParserUtil.next_lex lexbuf) )
# 2534 "cfLexer.ml"

  | 60 ->
# 236 "cfLexer.mll"
              ( CfParser.OP_VEC_SUB                   (CfParserUtil.next_lex lexbuf) )
# 2539 "cfLexer.ml"

  | 61 ->
# 237 "cfLexer.mll"
              ( CfParser.OP_LSHIFT                    (CfParserUtil.next_lex lexbuf) )
# 2544 "cfLexer.ml"

  | 62 ->
# 238 "cfLexer.mll"
              ( CfParser.OP_RSHIFT                    (CfParserUtil.next_lex lexbuf) )
# 2549 "cfLexer.ml"

  | 63 ->
# 239 "cfLexer.mll"
              ( CfParser.OP_VEC_LSHIFT                (CfParserUtil.next_lex lexbuf) )
# 2554 "cfLexer.ml"

  | 64 ->
# 240 "cfLexer.mll"
              ( CfParser.OP_VEC_RSHIFT                (CfParserUtil.next_lex lexbuf) )
# 2559 "cfLexer.ml"

  | 65 ->
# 241 "cfLexer.mll"
              ( CfParser.OP_VEC_RSHIFT_S              (CfParserUtil.next_lex lexbuf) )
# 2564 "cfLexer.ml"

  | 66 ->
# 242 "cfLexer.mll"
              ( CfParser.OP_LT                        (CfParserUtil.next_lex lexbuf) )
# 2569 "cfLexer.ml"

  | 67 ->
# 243 "cfLexer.mll"
              ( CfParser.OP_GT                        (CfParserUtil.next_lex lexbuf) )
# 2574 "cfLexer.ml"

  | 68 ->
# 244 "cfLexer.mll"
              ( CfParser.OP_LE                        (CfParserUtil.next_lex lexbuf) )
# 2579 "cfLexer.ml"

  | 69 ->
# 245 "cfLexer.mll"
              ( CfParser.OP_GE                        (CfParserUtil.next_lex lexbuf) )
# 2584 "cfLexer.ml"

  | 70 ->
# 246 "cfLexer.mll"
              ( CfParser.OP_VEC_LT                    (CfParserUtil.next_lex lexbuf) )
# 2589 "cfLexer.ml"

  | 71 ->
# 247 "cfLexer.mll"
              ( CfParser.OP_VEC_GT                    (CfParserUtil.next_lex lexbuf) )
# 2594 "cfLexer.ml"

  | 72 ->
# 248 "cfLexer.mll"
              ( CfParser.OP_VEC_LE                    (CfParserUtil.next_lex lexbuf) )
# 2599 "cfLexer.ml"

  | 73 ->
# 249 "cfLexer.mll"
              ( CfParser.OP_VEC_GE                    (CfParserUtil.next_lex lexbuf) )
# 2604 "cfLexer.ml"

  | 74 ->
# 250 "cfLexer.mll"
              ( CfParser.OP_VEC_LT_S                  (CfParserUtil.next_lex lexbuf) )
# 2609 "cfLexer.ml"

  | 75 ->
# 251 "cfLexer.mll"
              ( CfParser.OP_VEC_GT_S                  (CfParserUtil.next_lex lexbuf) )
# 2614 "cfLexer.ml"

  | 76 ->
# 252 "cfLexer.mll"
              ( CfParser.OP_VEC_LE_S                  (CfParserUtil.next_lex lexbuf) )
# 2619 "cfLexer.ml"

  | 77 ->
# 253 "cfLexer.mll"
              ( CfParser.OP_VEC_GE_S                  (CfParserUtil.next_lex lexbuf) )
# 2624 "cfLexer.ml"

  | 78 ->
# 254 "cfLexer.mll"
              ( CfParser.OP_REPEAT                    (CfParserUtil.next_lex lexbuf) )
# 2629 "cfLexer.ml"

  | 79 ->
# 255 "cfLexer.mll"
              ( CfParser.OP_VEC_REPEAT                (CfParserUtil.next_lex lexbuf) )
# 2634 "cfLexer.ml"

  | 80 ->
# 256 "cfLexer.mll"
              ( CfParser.OP_CONS                      (CfParserUtil.next_lex lexbuf) )
# 2639 "cfLexer.ml"

  | 81 ->
# 257 "cfLexer.mll"
              ( CfParser.OP_CONCAT                    (CfParserUtil.next_lex lexbuf) )
# 2644 "cfLexer.ml"

  | 82 ->
# 258 "cfLexer.mll"
              ( CfParser.OP_VEC_CONCAT                (CfParserUtil.next_lex lexbuf) )
# 2649 "cfLexer.ml"

  | 83 ->
# 259 "cfLexer.mll"
              ( CfParser.OP_RETURN                    (CfParserUtil.next_lex lexbuf) )
# 2654 "cfLexer.ml"

  | 84 ->
# 260 "cfLexer.mll"
              ( CfParser.OP_EQU                       (CfParserUtil.next_lex lexbuf) )
# 2659 "cfLexer.ml"

  | 85 ->
# 261 "cfLexer.mll"
              ( CfParser.OP_NEQ                       (CfParserUtil.next_lex lexbuf) )
# 2664 "cfLexer.ml"

  | 86 ->
# 262 "cfLexer.mll"
              ( CfParser.OP_VEC_EQU                   (CfParserUtil.next_lex lexbuf) )
# 2669 "cfLexer.ml"

  | 87 ->
# 263 "cfLexer.mll"
              ( CfParser.OP_VEC_NEQ                   (CfParserUtil.next_lex lexbuf) )
# 2674 "cfLexer.ml"

  | 88 ->
# 264 "cfLexer.mll"
              ( CfParser.OP_BW_AND                    (CfParserUtil.next_lex lexbuf) )
# 2679 "cfLexer.ml"

  | 89 ->
# 265 "cfLexer.mll"
              ( CfParser.OP_VEC_AND                   (CfParserUtil.next_lex lexbuf) )
# 2684 "cfLexer.ml"

  | 90 ->
# 266 "cfLexer.mll"
              ( CfParser.OP_BW_XOR                    (CfParserUtil.next_lex lexbuf) )
# 2689 "cfLexer.ml"

  | 91 ->
# 267 "cfLexer.mll"
              ( CfParser.OP_VEC_XOR                   (CfParserUtil.next_lex lexbuf) )
# 2694 "cfLexer.ml"

  | 92 ->
# 268 "cfLexer.mll"
              ( CfParser.OP_BW_OR                     (CfParserUtil.next_lex lexbuf) )
# 2699 "cfLexer.ml"

  | 93 ->
# 269 "cfLexer.mll"
              ( CfParser.OP_VEC_OR                    (CfParserUtil.next_lex lexbuf) )
# 2704 "cfLexer.ml"

  | 94 ->
# 270 "cfLexer.mll"
              ( CfParser.OP_AND                       (CfParserUtil.next_lex lexbuf) )
# 2709 "cfLexer.ml"

  | 95 ->
# 271 "cfLexer.mll"
              ( CfParser.OP_OR                        (CfParserUtil.next_lex lexbuf) )
# 2714 "cfLexer.ml"

  | 96 ->
# 272 "cfLexer.mll"
              ( CfParser.OP_PROP_AND                  (CfParserUtil.next_lex lexbuf) )
# 2719 "cfLexer.ml"

  | 97 ->
# 273 "cfLexer.mll"
              ( CfParser.OP_PROP_XOR                  (CfParserUtil.next_lex lexbuf) )
# 2724 "cfLexer.ml"

  | 98 ->
# 274 "cfLexer.mll"
              ( CfParser.OP_PROP_OR                   (CfParserUtil.next_lex lexbuf) )
# 2729 "cfLexer.ml"

  | 99 ->
# 275 "cfLexer.mll"
              ( CfParser.OP_PROP_EQUIV                (CfParserUtil.next_lex lexbuf) )
# 2734 "cfLexer.ml"

  | 100 ->
# 276 "cfLexer.mll"
              ( CfParser.OP_PROP_IMPLY                (CfParserUtil.next_lex lexbuf) )
# 2739 "cfLexer.ml"

  | 101 ->
# 277 "cfLexer.mll"
              ( CfParser.OP_PROP_U                    (CfParserUtil.next_lex lexbuf) )
# 2744 "cfLexer.ml"

  | 102 ->
# 278 "cfLexer.mll"
              ( CfParser.OP_THEN                      (CfParserUtil.next_lex lexbuf) )
# 2749 "cfLexer.ml"

  | 103 ->
# 279 "cfLexer.mll"
              ( CfParser.OP_VEC_THEN                  (CfParserUtil.next_lex lexbuf) )
# 2754 "cfLexer.ml"

  | 104 ->
# 280 "cfLexer.mll"
              ( CfParser.OP_VEC_ELSE                  (CfParserUtil.next_lex lexbuf) )
# 2759 "cfLexer.ml"

  | 105 ->
# 281 "cfLexer.mll"
              ( CfParser.OP_CONNECT_LEFT              (CfParserUtil.next_lex lexbuf) )
# 2764 "cfLexer.ml"

  | 106 ->
# 282 "cfLexer.mll"
              ( CfParser.OP_CONNECT_RIGHT             (CfParserUtil.next_lex lexbuf) )
# 2769 "cfLexer.ml"

  | 107 ->
# 283 "cfLexer.mll"
              ( CfParser.OP_UNIFY                     (CfParserUtil.next_lex lexbuf) )
# 2774 "cfLexer.ml"

  | 108 ->
# 285 "cfLexer.mll"
                  ( CfParser.IDENTIFIER               (CfParserUtil.next_lex lexbuf) )
# 2779 "cfLexer.ml"

  | 109 ->
# 287 "cfLexer.mll"
              ( CfParserUtil.error ("Unrecognized character: '" ^ (snd (CfParserUtil.next_lex lexbuf)) ^ "'");
                CfParser.LexerError (CfParserUtil.next_lex lexbuf) )
# 2785 "cfLexer.ml"

  | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_token_rec lexbuf __ocaml_lex_state

and comment lexbuf =
  __ocaml_lex_comment_rec lexbuf 409
and __ocaml_lex_comment_rec lexbuf __ocaml_lex_state =
  match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with
      | 0 ->
# 291 "cfLexer.mll"
            ( let _ = CfParserUtil.next_lex lexbuf in incr commentDepth; comment lexbuf )
# 2796 "cfLexer.ml"

  | 1 ->
# 292 "cfLexer.mll"
            ( let _ = CfParserUtil.next_lex lexbuf in decr commentDepth; if !commentDepth <> 0 then comment lexbuf else () )
# 2801 "cfLexer.ml"

  | 2 ->
# 293 "cfLexer.mll"
            ( let _ = CfParserUtil.next_lex lexbuf in comment lexbuf )
# 2806 "cfLexer.ml"

  | 3 ->
# 294 "cfLexer.mll"
            ( CfParserUtil.error ("End of file without closing comment.") )
# 2811 "cfLexer.ml"

  | 4 ->
# 295 "cfLexer.mll"
            ( let _ = CfParserUtil.next_lex lexbuf in comment lexbuf )
# 2816 "cfLexer.ml"

  | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_comment_rec lexbuf __ocaml_lex_state