Photon 1.0.0
Loading...
Searching...
No Matches
parser.h
Go to the documentation of this file.
1// Copyright 2010 Google Inc. All Rights Reserved.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Author: jdtang@google.com (Jonathan Tang)
16//
17// Contains the definition of the top-level GumboParser structure that's
18// threaded through basically every internal function in the library.
19
20#ifndef GUMBO_PARSER_H_
21#define GUMBO_PARSER_H_
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
31
32// An overarching struct that's threaded through (nearly) all functions in the
33// library, OOP-style. This gives each function access to the options and
34// output, along with any internal state needed for the parse.
35typedef struct GumboInternalParser {
36 // Settings for this parse run.
38
39 // Output for the parse.
41
42 // The internal tokenizer state, defined as a pointer to avoid a cyclic
43 // dependency on html5tokenizer.h. The main parse routine is responsible for
44 // initializing this on parse start, and destroying it on parse end.
45 // End-users will never see a non-garbage value in this pointer.
47
48 // The internal parser state. Initialized on parse start and destroyed on
49 // parse end; end-users will never see a non-garbage value in this pointer.
52
53#ifdef __cplusplus
54}
55#endif
56
57#endif // GUMBO_PARSER_H_
struct GumboInternalParser GumboParser
Definition gumbo.h:566
Definition gumbo.h:628
Definition parser.h:35
struct GumboInternalTokenizerState * _tokenizer_state
Definition parser.h:46
const struct GumboInternalOptions * _options
Definition parser.h:37
struct GumboInternalOutput * _output
Definition parser.h:40
struct GumboInternalParserState * _parser_state
Definition parser.h:50
Definition parser.c:339
Definition tokenizer.c:123