~ubuntu-branches/ubuntu/raring/qtwebkit-source/raring-proposed

« back to all changes in this revision

Viewing changes to Source/ThirdParty/ANGLE/src/compiler/preprocessor/tokens.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-02-18 14:24:18 UTC
  • Revision ID: package-import@ubuntu.com-20130218142418-eon0jmjg3nj438uy
Tags: upstream-2.3
ImportĀ upstreamĀ versionĀ 2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/****************************************************************************\
 
2
Copyright (c) 2002, NVIDIA Corporation.
 
3
 
 
4
NVIDIA Corporation("NVIDIA") supplies this software to you in
 
5
consideration of your agreement to the following terms, and your use,
 
6
installation, modification or redistribution of this NVIDIA software
 
7
constitutes acceptance of these terms.  If you do not agree with these
 
8
terms, please do not use, install, modify or redistribute this NVIDIA
 
9
software.
 
10
 
 
11
In consideration of your agreement to abide by the following terms, and
 
12
subject to these terms, NVIDIA grants you a personal, non-exclusive
 
13
license, under NVIDIA's copyrights in this original NVIDIA software (the
 
14
"NVIDIA Software"), to use, reproduce, modify and redistribute the
 
15
NVIDIA Software, with or without modifications, in source and/or binary
 
16
forms; provided that if you redistribute the NVIDIA Software, you must
 
17
retain the copyright notice of NVIDIA, this notice and the following
 
18
text and disclaimers in all such redistributions of the NVIDIA Software.
 
19
Neither the name, trademarks, service marks nor logos of NVIDIA
 
20
Corporation may be used to endorse or promote products derived from the
 
21
NVIDIA Software without specific prior written permission from NVIDIA.
 
22
Except as expressly stated in this notice, no other rights or licenses
 
23
express or implied, are granted by NVIDIA herein, including but not
 
24
limited to any patent rights that may be infringed by your derivative
 
25
works or by other works in which the NVIDIA Software may be
 
26
incorporated. No hardware is licensed hereunder. 
 
27
 
 
28
THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
 
29
WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED,
 
30
INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE,
 
31
NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
 
32
ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER
 
33
PRODUCTS.
 
34
 
 
35
IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT,
 
36
INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
 
37
TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 
38
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY
 
39
OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE
 
40
NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT,
 
41
TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF
 
42
NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
43
\****************************************************************************/
 
44
//
 
45
// tokens.h
 
46
//
 
47
 
 
48
#if !defined(__TOKENS_H)
 
49
#define __TOKENS_H 1
 
50
 
 
51
#include <stdio.h>
 
52
#include "compiler/preprocessor/parser.h"
 
53
 
 
54
#define EOF_SY (-1)
 
55
 
 
56
typedef struct TokenBlock_Rec TokenBlock;
 
57
 
 
58
typedef struct TokenStream_Rec {
 
59
    struct TokenStream_Rec *next;
 
60
    char *name;
 
61
    TokenBlock *head;
 
62
    TokenBlock *current;
 
63
} TokenStream;
 
64
 
 
65
struct TokenBlock_Rec {
 
66
    TokenBlock *next;
 
67
    int current;
 
68
    int count;
 
69
    int max;
 
70
    unsigned char *data;
 
71
};
 
72
 
 
73
extern TokenStream stdlib_cpp_stream;
 
74
 
 
75
 
 
76
TokenStream *NewTokenStream(const char *name, MemoryPool *pool);
 
77
void DeleteTokenStream(TokenStream *pTok); 
 
78
void RecordToken(TokenStream *pTok, int token, yystypepp * yylvalpp);
 
79
void RewindTokenStream(TokenStream *pTok);
 
80
int ReadToken(TokenStream *pTok, yystypepp * yylvalpp);
 
81
int ReadFromTokenStream(TokenStream *pTok, int name, int (*final)(CPPStruct *));
 
82
void UngetToken(int, yystypepp * yylvalpp);
 
83
 
 
84
#if defined(CPPC_ENABLE_TOOLS)
 
85
 
 
86
void DumpTokenStream(FILE *, TokenStream *, yystypepp * yylvalpp);
 
87
 
 
88
#endif // defined(CPPC_ENABLE_TOOLS)
 
89
 
 
90
#endif // !defined(__TOKENS_H)