Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

open-axiom repository from github

24005 views
1
/*
2
Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.
3
All rights reserved.
4
Copyright (C) 2007-2008, Gabriel Dos Reis.
5
All rights reserved.
6
7
Redistribution and use in source and binary forms, with or without
8
modification, are permitted provided that the following conditions are
9
met:
10
11
- Redistributions of source code must retain the above copyright
12
notice, this list of conditions and the following disclaimer.
13
14
- Redistributions in binary form must reproduce the above copyright
15
notice, this list of conditions and the following disclaimer in
16
the documentation and/or other materials provided with the
17
distribution.
18
19
- Neither the name of The Numerical Algorithms Group Ltd. nor the
20
names of its contributors may be used to endorse or promote products
21
derived from this software without specific prior written permission.
22
23
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
24
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
25
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
26
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
27
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
28
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
29
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
30
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
31
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
*/
35
36
#ifndef _LEX_H_
37
#define _LEX_H_ 1
38
39
#include "token.h"
40
41
#define HTCONDNODE 1 /* unrecognized condition node */
42
#define KEYTYPE 2 /* unrecognized keyword found in lex.c */
43
#define Numerrors 2
44
45
extern void get_expected_token(int);
46
extern void parser_init();
47
extern void init_scanner();
48
extern void save_scanner_state();
49
extern void restore_scanner_state();
50
extern void unget_char(int);
51
extern int get_char();
52
extern void unget_token();
53
extern int get_token();
54
extern void push_be_stack(int, const char*);
55
extern void check_and_pop_be_stack(int, const char*);
56
extern int clear_be_stack();
57
extern int be_type(const char*);
58
extern int begin_type();
59
extern int end_type();
60
extern void reset_connection();
61
62
extern void print_page_and_filename();
63
extern void jump();
64
extern void print_token();
65
extern void token_name(int);
66
extern void print_next_ten_tokens();
67
68
extern long fpos, keyword_fpos;
69
extern Token token;
70
extern int last_token, last_ch;
71
extern SourceInputKind input_type;
72
extern char *input_string;
73
extern FILE *cfile;
74
extern short int gInSpadsrc;
75
extern short int gInVerbatim;
76
77
78
#endif
79
80