blob: 5bf38fe8093bac84fb8dda60967acef30777e9dc [file] [log] [blame]
Ed Warnickecb9cada2015-12-08 15:45:58 -07001/*
2 *------------------------------------------------------------------
3 * lex.h - definitions for the api generator's lexical
4 * analyzer.
5 *
6 * Copyright (c) 1996-2009 Cisco and/or its affiliates.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at:
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 *------------------------------------------------------------------
19 */
20
21#ifndef _LEX_H_
22#define _LEX_H_ 1
23
24extern int yylex (void);
25extern void yyerror (char *);
26extern int yyparse (void);
27
28#ifndef YYSTYPE
29#define YYSTYPE void *
30#endif
31
32#include "gram.h"
33
34enum lex_state {
35 START_STATE = 1,
36 NAME_STATE,
37 NUMBER_STATE,
38 C_COMMENT_STATE,
39 CPP_COMMENT_STATE,
40 STRING_STATE,
41 HELPER_STATE,
42 LINE_PRAGMA_STATE,
43};
44
45#define MAXNAME 64000
46
47extern unsigned long input_crc;
48
49#endif /* _LEX_H_ */