Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 1 | /* |
| 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 | |
| 24 | extern int yylex (void); |
| 25 | extern void yyerror (char *); |
| 26 | extern int yyparse (void); |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 27 | extern void autoreply (void *); |
Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 28 | |
| 29 | #ifndef YYSTYPE |
| 30 | #define YYSTYPE void * |
| 31 | #endif |
| 32 | |
| 33 | #include "tools/vppapigen/gram.h" |
| 34 | |
| 35 | enum 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 | |
| 48 | extern unsigned long input_crc; |
| 49 | extern unsigned long message_crc; |
| 50 | |
| 51 | #endif /* _LEX_H_ */ |