/[dynamips]/upstream/dynamips-0.2.6-RC1/parser.h
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /upstream/dynamips-0.2.6-RC1/parser.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (hide annotations)
Sat Oct 6 16:01:44 2007 UTC (12 years, 2 months ago) by dpavlin
Original Path: upstream/dynamips-0.2.5/parser.h
File MIME type: text/plain
File size: 930 byte(s)
import 0.2.5 from upstream

1 dpavlin 1 /*
2     * Cisco 7200 (Predator) simulation platform.
3     * Copyright (c) 2005,2006 Christophe Fillot (cf@utc.fr)
4     */
5    
6     #ifndef __PARSER_H__
7     #define __PARSER_H__
8    
9     #include <sys/types.h>
10    
11     /* Parser Errors */
12     enum {
13     PARSER_ERROR_NOMEM = 1,
14     PARSER_ERROR_UNEXP_QUOTE, /* Unexpected quote in a word */
15     PARSER_ERROR_UNEXP_EOL, /* Unexpected end of line */
16     };
17    
18     /* Token */
19     typedef struct parser_token parser_token_t;
20     struct parser_token {
21     char *value;
22     struct parser_token *next;
23     };
24    
25     /* Get a description given an error code */
26     char *parser_strerror(int error);
27    
28     /* Free a token list */
29     void parser_free_tokens(parser_token_t *tok_list);
30    
31     /* Dump a token list */
32     void parser_dump_tokens(parser_token_t *tok_list);
33    
34     /* Map a token list to an array */
35     char **parser_map_array(parser_token_t *tok_list,int tok_count);
36    
37     /* Tokenize a string */
38     int parser_tokenize(char *str,struct parser_token **tokens,int *tok_count);
39    
40     #endif

  ViewVC Help
Powered by ViewVC 1.1.26