blob: fc716fdcd15d533928fcdcea22021628e9fda17e [file] [log] [blame]
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -08001/*
2 * Copyright (C) 2007 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef AMEND_LEXER_H_
18#define AMEND_LEXER_H_
19
20#define AMEND_LEXER_BUFFER_INPUT 1
21
22void yyerror(const char *msg);
23int yylex(void);
24
25#if AMEND_LEXER_BUFFER_INPUT
26void setLexerInputBuffer(const char *buf, size_t buflen);
27#else
28#include <stdio.h>
29void yyset_in(FILE *in_str);
30#endif
31
32const char *tokenToString(int token);
33
34typedef enum {
35 AM_UNKNOWN_ARGS,
36 AM_WORD_ARGS,
37 AM_BOOLEAN_ARGS,
38} AmArgumentType;
39
40void setLexerArgumentType(AmArgumentType type);
41int getLexerLineNumber(void);
42
43#endif // AMEND_LEXER_H_