File indexing completed on 2025-01-26 04:44:00
0001 /* ------------------------------------------------------------------------ 0002 @NAME : lex_auxiliary.h 0003 @DESCRIPTION: Macros and function prototypes needed by the lexical scanner. 0004 Some of these are called from internal PCCTS code, and some 0005 are explicitly called from the lexer actions in bibtex.g. 0006 @CREATED : Summer 1996, Greg Ward 0007 @MODIFIED : 0008 @VERSION : $Id: lex_auxiliary.h,v 1.15 1999/11/29 01:13:10 greg Rel $ 0009 @COPYRIGHT : Copyright (c) 1996-99 by Gregory P. Ward. All rights reserved. 0010 0011 This file is part of the btparse library. This library is 0012 free software; you can redistribute it and/or modify it under 0013 the terms of the GNU General Public License as 0014 published by the Free Software Foundation; either version 2 0015 of the License, or (at your option) any later version. 0016 -------------------------------------------------------------------------- */ 0017 #ifndef LEX_AUXILIARY_H 0018 #define LEX_AUXILIARY_H 0019 0020 #include "btparse.h" 0021 #include "attrib.h" 0022 0023 #define ZZCOPY_FUNCTION 0 0024 0025 #if ZZCOPY_FUNCTION 0026 #define ZZCOPY zzcopy (&zznextpos, &lastpos, &zzbufovf) 0027 #else 0028 #define ZZCOPY \ 0029 if (zznextpos >= lastpos) \ 0030 { \ 0031 lexer_overflow (&lastpos, &zznextpos); \ 0032 } \ 0033 *(zznextpos++) = zzchar; 0034 #endif 0035 0036 0037 /* Function prototypes: */ 0038 0039 void lex_info (void); 0040 void zzcr_attr (Attrib *a, int tok, char *txt); 0041 0042 void alloc_lex_buffer (int size); 0043 void free_lex_buffer (void); 0044 void lexer_overflow (unsigned char **lastpos, unsigned char **nextpos); 0045 #if ZZCOPY_FUNCTION 0046 void zzcopy (char **nextpos, char **lastpos, int *ovf_flag); 0047 #endif 0048 0049 void initialize_lexer_state (void); 0050 bt_metatype entry_metatype (void); 0051 0052 void newline (void); 0053 void comment (void); 0054 void at_sign (void); 0055 void toplevel_junk (void); 0056 void name (void); 0057 void lbrace (void); 0058 void rbrace (void); 0059 void lparen (void); 0060 void rparen (void); 0061 0062 void start_string (char start_char); 0063 void end_string (char end_char); 0064 void open_brace (void); 0065 void close_brace (void); 0066 void lparen_in_string (void); 0067 void rparen_in_string (void); 0068 void quote_in_string (void); 0069 void check_runaway_string (void); 0070 0071 #endif /* ! defined LEX_AUXILIARY_H */