| 1 |
%{ |
|---|
| 2 |
/* ====================================================================== |
|---|
| 3 |
* Copyright (c) 2000 Theo Schlossnagle |
|---|
| 4 |
* All rights reserved. |
|---|
| 5 |
* The following code was written by Theo Schlossnagle <jesus@omniti.com> |
|---|
| 6 |
* This code was written to facilitate clustered logging via Spread. |
|---|
| 7 |
* More information on Spread can be found at http://www.spread.org/ |
|---|
| 8 |
* Please refer to the LICENSE file before using this software. |
|---|
| 9 |
* ====================================================================== |
|---|
| 10 |
*/ |
|---|
| 11 |
|
|---|
| 12 |
#include "sld_config.h" |
|---|
| 13 |
#include "y.tab.h" |
|---|
| 14 |
|
|---|
| 15 |
extern int line_num; |
|---|
| 16 |
extern int semantic_errors; |
|---|
| 17 |
|
|---|
| 18 |
#define yylval sld_lval |
|---|
| 19 |
#define yytext sld_text |
|---|
| 20 |
|
|---|
| 21 |
%} |
|---|
| 22 |
qstring \"[^\"]*\"|\'[^\']*\' |
|---|
| 23 |
string [^ \t\r\n#{}]+ |
|---|
| 24 |
%option noyywrap |
|---|
| 25 |
%% |
|---|
| 26 |
#.* {} /* Comments */ |
|---|
| 27 |
[ \t\r] {} /* White space */ |
|---|
| 28 |
\n { line_num++;} |
|---|
| 29 |
"{" { return OPENBRACE; } |
|---|
| 30 |
"}" { return CLOSEBRACE; } |
|---|
| 31 |
"=" { return EQUALS; } |
|---|
| 32 |
BufferSize { return BUFFERSIZE; } |
|---|
| 33 |
Spread { return SPREAD; } |
|---|
| 34 |
Port { return PORT; } |
|---|
| 35 |
Host { return HOST; } |
|---|
| 36 |
Log { return LOG; } |
|---|
| 37 |
VhostGroup { return VHOSTGROUP; } |
|---|
| 38 |
Group { return GROUP; } |
|---|
| 39 |
File { return FILENAME; } |
|---|
| 40 |
VhostDir { return VHOSTDIR; } |
|---|
| 41 |
Match { return MATCH; } |
|---|
| 42 |
RewriteTimestamp { return REWRITETIMES; } |
|---|
| 43 |
CommonLogFormat { return CLF; } |
|---|
| 44 |
ModuleDir { return MODULEDIR; } |
|---|
| 45 |
LoadModule { return LOADMODULE; } |
|---|
| 46 |
ModuleLog { return MODULELOG; } |
|---|
| 47 |
PerlLib { return PERLLIB; } |
|---|
| 48 |
PerlUse { return PERLUSE; } |
|---|
| 49 |
PerlLog { return PERLLOG; } |
|---|
| 50 |
PerlHup { return PERLHUP; } |
|---|
| 51 |
PythonImport { return PYTHONIMPORT; } |
|---|
| 52 |
PythonLog { return PYTHONLOG; } |
|---|
| 53 |
{qstring} { int l = strlen(yytext); |
|---|
| 54 |
yytext[l-1] = 0; |
|---|
| 55 |
yylval = strdup(yytext+1); |
|---|
| 56 |
return STRING; } |
|---|
| 57 |
{string} { yylval = strdup(yytext); |
|---|
| 58 |
return STRING; } |
|---|
| 59 |
%% |
|---|