blob: 275cf685a4b78b55cf6c8c2915eca9eb67df47a3 [file] [log] [blame]
Damjan Marion7cd468a2016-12-19 23:05:39 +01001/*
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);
Dave Barach11b8dbf2017-04-24 10:46:54 -040027extern void autoreply (void *);
Damjan Marion7cd468a2016-12-19 23:05:39 +010028
29#ifndef YYSTYPE
30#define YYSTYPE void *
31#endif
32
33#include "tools/vppapigen/gram.h"
34
35enum lex_state {
36 START_STATE = 1,
37 NAME_STATE,
38 NUMBER_STATE,
39 C_COMMENT_STATE,
40 CPP_COMMENT_STATE,
41 STRING_STATE,
42 HELPER_STATE,
43 LINE_PRAGMA_STATE,
44};
45
46#define MAXNAME 64000
47
48extern unsigned long input_crc;
49extern unsigned long message_crc;
50
51#endif /* _LEX_H_ */