Blame tests/prefix_nr.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
/* Builds "scanner.c". */
Packit f00812
/* The scanner itself is a no-op. A successful compilation is all we want. */
Packit f00812
#include <stdio.h>
Packit f00812
#include <stdlib.h>
Packit f00812
#include "config.h"
Packit f00812
Packit f00812
%}
Packit f00812
Packit f00812
%option 8bit prefix="FOO"
Packit f00812
%option nounput nomain noyywrap noinput
Packit f00812
%option warn
Packit f00812
Packit f00812
Packit f00812
%%
Packit f00812
Packit f00812
.|\n|\r  {
Packit f00812
Packit f00812
    /* Compile, but do not execute the following code. */
Packit f00812
    if( 0) {
Packit f00812
        FOO_create_buffer((FILE*)0,0);
Packit f00812
        FOO_delete_buffer((YY_BUFFER_STATE)0);
Packit f00812
        FOO_flush_buffer((YY_BUFFER_STATE)0);
Packit f00812
        FOO_init_buffer((YY_BUFFER_STATE)0,(FILE*)0);
Packit f00812
        FOO_load_buffer_state();
Packit f00812
        FOO_scan_buffer((char*)0,(yy_size_t)0);
Packit f00812
        FOO_scan_bytes((yyconst char*)0, 0);
Packit f00812
        FOO_scan_string((yyconst char*)0);
Packit f00812
        FOO_switch_to_buffer((YY_BUFFER_STATE)0);
Packit f00812
        yyin   = (FILE*)0;
Packit f00812
        yyout  = (FILE*)0;
Packit f00812
        yyleng = 0;
Packit f00812
        yylex();
Packit f00812
        yyrestart((FILE*)0);
Packit f00812
        yytext = (char*)0;
Packit f00812
    }
Packit f00812
 }
Packit f00812
%%
Packit f00812
Packit f00812
Packit f00812
int main(void);
Packit f00812
Packit f00812
int
Packit f00812
main ()
Packit f00812
{
Packit f00812
    yyin = stdin;
Packit f00812
    yyout = stdout;
Packit f00812
    FOOlex();
Packit f00812
    printf("TEST RETURNING OK.\n");
Packit f00812
    return 0;
Packit f00812
}
Packit f00812