Initial Revision
[ohcount] / ext / ohcount_native / parser.h
1 /*
2  *  parser.h
3  *  Ohcount
4  *
5  *  Created by Jason Allen on 6/23/06.
6  *  Copyright 2006 Ohloh. All rights reserved.
7  *
8  */
9
10
11 /*
12  * ParseResult
13  *
14  * Calling parser_parse fills out one of these babies. Each language ('html', 'css'...) is
15  * represented in its own language_breakdown.
16  *
17  */
18 typedef struct {
19         LanguageBreakdown language_breakdowns[MAX_LANGUAGE_BREAKDOWN_SIZE];
20         int language_breakdown_count;
21 } ParseResult;
22
23
24 /*
25  * Fills out the ParseResult with the result of parsing the buffer with the specific Language
26  */
27 void parse_result_free(ParseResult *parse_result);
28
29 /*
30  * frees the memory held by the ParseResult
31  */
32 void parser_parse(ParseResult *pr, char *buffer, int buffer_len, Polyglot *polyglot);
33