Blame tests/multiple_scanners_nr_2.l

Packit f00812
/*
Packit f00812
 * This file is part of flex.
Packit f00812
 * 
Packit f00812
 * Redistribution and use in source and binary forms, with or without
Packit f00812
 * modification, are permitted provided that the following conditions
Packit f00812
 * are met:
Packit f00812
 * 
Packit f00812
 * 1. Redistributions of source code must retain the above copyright
Packit f00812
 *    notice, this list of conditions and the following disclaimer.
Packit f00812
 * 2. Redistributions in binary form must reproduce the above copyright
Packit f00812
 *    notice, this list of conditions and the following disclaimer in the
Packit f00812
 *    documentation and/or other materials provided with the distribution.
Packit f00812
 * 
Packit f00812
 * Neither the name of the University nor the names of its contributors
Packit f00812
 * may be used to endorse or promote products derived from this software
Packit f00812
 * without specific prior written permission.
Packit f00812
 * 
Packit f00812
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
Packit f00812
 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
Packit f00812
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
Packit f00812
 * PURPOSE.
Packit f00812
 */
Packit f00812
Packit f00812
%{
Packit f00812
/* A template scanner file to build "scanner-2.c" and "scanner-2.h". */
Packit f00812
#include <stdio.h>
Packit f00812
#include <stdlib.h>
Packit f00812
#include "config.h"
Packit f00812
Packit f00812
%}
Packit f00812
Packit f00812
%option header="multiple_scanners_nr_2.h"
Packit f00812
%option 8bit prefix="S2_"
Packit f00812
%option nounput nomain noyywrap noinput
Packit f00812
%option warn stack noyy_top_state
Packit f00812
Packit f00812
%x OFF
Packit f00812
%x ON
Packit f00812
%%
Packit f00812
<INITIAL>{
Packit f00812
on    yy_push_state(ON); return 3;
Packit f00812
off   yy_push_state(OFF); return 4;
Packit f00812
.|\n  return 5;
Packit f00812
}
Packit f00812
<ON>.|\n  yy_pop_state(); return 6;
Packit f00812
Packit f00812
<OFF>.|\n yy_pop_state(); return 7;
Packit f00812
%%
Packit f00812