00001 /* 00002 * Copyright 1999-2006 University of Chicago 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 #ifndef GLOBUS_I_RSL_PARSER_H 00018 #define GLOBUS_I_RSL_PARSER_H 00019 00020 #include "globus_common.h" 00021 00022 /* the scanner matches left and right-parens by 00023 * introducing a new counter at the beginning of each 00024 * variable reference expression. this allows it to 00025 * detect the terminating right-paren of the variable reference 00026 * and check whether the enjambed implicit-concatenation 00027 * syntax is being used. it then restores the previous 00028 * paren counter and keeps going (to recognize the end 00029 * of any enclosing variable reference expression). 00030 */ 00031 typedef struct paren_count_stack_elem_s 00032 { 00033 int count; 00034 } 00035 paren_count_stack_elem_t; 00036 00037 typedef struct 00038 globus_parse_state_s 00039 { 00040 char *myinput; 00041 char *myinputptr; 00042 char *myinputlim; 00043 globus_rsl_t *rsl_spec; 00044 globus_rsl_parse_error_t *error_structure; 00045 int globus_parse_error_flag; 00046 int calling_state; 00047 char quote_delimiter; 00048 globus_fifo_t *quote_text_fifo; 00049 /* manipulate this list as stack... 00050 * introduced as a list rather than an abstract-data-type 00051 * so we can simply init it here as the constant NULL. */ 00052 globus_list_t *paren_count_stack; 00053 } globus_parse_state_t; 00054 00055 extern 00056 int 00057 globus_i_rsl_yyinput(globus_parse_state_t *parse_state, char *buf, yy_size_t *num_read, int max_size); 00058 00059 #endif /* GLOBUS_I_RSL_PARSER_H */