1 //
2 // aegis - project change supervisor
3 // Copyright (C) 1997, 2002, 2003, 2005, 2006, 2008, 2012 Peter Miller
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or (at
8 // your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 // General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
19 #ifndef AEFIND_LEX_H
20 #define AEFIND_LEX_H
21 
22 #include <libaegis/arglex2.h>
23 
24 enum
25 {
26     arglex_token_and = ARGLEX2_MAX,
27     arglex_token_atime,
28     arglex_token_bit_and,
29     arglex_token_bit_or,
30     arglex_token_bit_xor,
31     arglex_token_comma,
32     arglex_token_ctime,
33     arglex_token_debug,
34     arglex_token_delete,
35     arglex_token_div,
36     arglex_token_eq,
37     arglex_token_execute,
38     arglex_token_false,
39     arglex_token_ge,
40     arglex_token_gt,
41     arglex_token_join,
42     arglex_token_le,
43     arglex_token_left_paren,
44     arglex_token_lt,
45     arglex_token_mod,
46     arglex_token_mtime,
47     arglex_token_mul,
48     arglex_token_namekw,
49     arglex_token_ne,
50     arglex_token_newer,
51     arglex_token_not,
52     arglex_token_now,
53     arglex_token_or,
54     arglex_token_path,
55     arglex_token_plus,
56     arglex_token_print,
57     arglex_token_resolve,
58     arglex_token_resolve_not,
59     arglex_token_right_paren,
60     arglex_token_semicolon,
61     arglex_token_shift_left,
62     arglex_token_shift_right,
63     arglex_token_size,
64     arglex_token_stringize,
65     arglex_token_this,
66     arglex_token_this_resolved,
67     arglex_token_this_unresolved,
68     arglex_token_tilde,
69     arglex_token_true,
70     arglex_token_type,
71     ARGLEX3_MAX
72 };
73 
74 void cmdline_lex_open(int, char **);
75 void cmdline_lex_close(void);
76 int cmdline_lex(void);
77 void cmdline_error(const char *);
78 void usage(void);
79 
80 struct sub_context_ty; // existence
81 void cmdline_lex_error(struct sub_context_ty *, const char *);
82 
83 #endif // AEFIND_LEX_H
84 // vim: set ts=8 sw=4 et :
85