Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [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); |
| 27 | |
| 28 | #ifndef YYSTYPE |
| 29 | #define YYSTYPE void * |
| 30 | #endif |
| 31 | |
| 32 | #include "gram.h" |
| 33 | |
| 34 | enum 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 | |
| 47 | extern unsigned long input_crc; |
Dave Barach | 557d128 | 2016-11-10 14:22:49 -0500 | [diff] [blame^] | 48 | extern unsigned long message_crc; |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 49 | |
| 50 | #endif /* _LEX_H_ */ |