| 1 |
%{ |
| 2 |
/********************************************************************* |
| 3 |
* |
| 4 |
* Authors: Vincenzo Ciaschini - [email protected] |
| 5 |
* |
| 6 |
* Copyright (c) Members of the EGEE Collaboration. 2004-2010. |
| 7 |
* See http://www.eu-egee.org/partners/ for details on the copyright holders. |
| 8 |
* |
| 9 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
| 10 |
* you may not use this file except in compliance with the License. |
| 11 |
* You may obtain a copy of the License at |
| 12 |
* |
| 13 |
* http://www.apache.org/licenses/LICENSE-2.0 |
| 14 |
* |
| 15 |
* Unless required by applicable law or agreed to in writing, software |
| 16 |
* distributed under the License is distributed on an "AS IS" BASIS, |
| 17 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 18 |
* See the License for the specific language governing permissions and |
| 19 |
* limitations under the License. |
| 20 |
* |
| 21 |
* Parts of this code may be based upon or even include verbatim pieces, |
| 22 |
* originally written by other people, in which case the original header |
| 23 |
* follows. |
| 24 |
* |
| 25 |
*********************************************************************/ |
| 26 |
#include "config.h" |
| 27 |
#include <stdio.h> |
| 28 |
#include <string.h> |
| 29 |
|
| 30 |
#include <stdlib.h> |
| 31 |
|
| 32 |
#include "parsertypes.h" |
| 33 |
#include "namespaces_parse.h" |
| 34 |
%} |
| 35 |
|
| 36 |
%x SINGLE_QUOTED |
| 37 |
%x DOUBLE_QUOTED |
| 38 |
|
| 39 |
%option reentrant |
| 40 |
%option noyywrap |
| 41 |
%option prefix="namespaces" |
| 42 |
%option bison-bridge |
| 43 |
|
| 44 |
%% |
| 45 |
|
| 46 |
\#.* /* comment. Ignore */ |
| 47 |
|
| 48 |
\' BEGIN(SINGLE_QUOTED); |
| 49 |
|
| 50 |
<SINGLE_QUOTED>[^']*\' yytext[strlen(yytext)-1]='\0'; yylval_param->string = yytext; BEGIN(INITIAL); return SUBJECT; |
| 51 |
|
| 52 |
\" BEGIN(DOUBLE_QUOTED); |
| 53 |
<DOUBLE_QUOTED>[^"]*\" yytext[strlen(yytext)-1]='\0'; yylval_param->string = yytext; BEGIN(INITIAL); return SUBJECT; |
| 54 |
|
| 55 |
|
| 56 |
(?i:TO) return TO; |
| 57 |
(?i:ISSUER) return ISSUER; |
| 58 |
(?i:PERMIT) return PERMIT; |
| 59 |
(?i:DENY) return DENY; |
| 60 |
(?i:SELF) return SELF; |
| 61 |
(?i:SUBJECT) return SUBJECT_WORD; |
| 62 |
\\$ |
| 63 |
\n |
| 64 |
. |
| 65 |
|
| 66 |
%% |