/*1Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.2All rights reserved.3Copyright (C) 2007-2008, Gabriel Dos Reis.4All rights reserved.56Redistribution and use in source and binary forms, with or without7modification, are permitted provided that the following conditions are8met:910- Redistributions of source code must retain the above copyright11notice, this list of conditions and the following disclaimer.1213- Redistributions in binary form must reproduce the above copyright14notice, this list of conditions and the following disclaimer in15the documentation and/or other materials provided with the16distribution.1718- Neither the name of The Numerical Algorithms Group Ltd. nor the19names of its contributors may be used to endorse or promote products20derived from this software without specific prior written permission.2122THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS23IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED24TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A25PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER26OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,27EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,28PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR29PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF30LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING31NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS32SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.33*/3435#ifndef _LEX_H_36#define _LEX_H_ 13738#include "token.h"3940#define HTCONDNODE 1 /* unrecognized condition node */41#define KEYTYPE 2 /* unrecognized keyword found in lex.c */42#define Numerrors 24344extern void get_expected_token(int);45extern void parser_init();46extern void init_scanner();47extern void save_scanner_state();48extern void restore_scanner_state();49extern void unget_char(int);50extern int get_char();51extern void unget_token();52extern int get_token();53extern void push_be_stack(int, const char*);54extern void check_and_pop_be_stack(int, const char*);55extern int clear_be_stack();56extern int be_type(const char*);57extern int begin_type();58extern int end_type();59extern void reset_connection();6061extern void print_page_and_filename();62extern void jump();63extern void print_token();64extern void token_name(int);65extern void print_next_ten_tokens();6667extern long fpos, keyword_fpos;68extern Token token;69extern int last_token, last_ch;70extern SourceInputKind input_type;71extern char *input_string;72extern FILE *cfile;73extern short int gInSpadsrc;74extern short int gInVerbatim;757677#endif787980