//===--- Parser.h - C Language Parser ---------------------------*- C++ -*-===////// The LLVM Compiler Infrastructure//// This file is distributed under the University of Illinois Open Source// License. See LICENSE.TXT for details.////===----------------------------------------------------------------------===////// This file defines the Parser interface.////===----------------------------------------------------------------------===//#ifndef LLVM_CLANG_PARSE_PARSER_H#define LLVM_CLANG_PARSE_PARSER_H#include"clang/Basic/Specifiers.h"#include"clang/Lex/Preprocessor.h"#include"clang/Parse/Action.h"#include"clang/Parse/DeclSpec.h"#include"llvm/ADT/OwningPtr.h"#include<stack>#include<list>namespaceclang{classAttributeList;structCXX0XAttributeList;classPragmaHandler;classScope;classDiagnosticBuilder;classParser;classPragmaUnusedHandler;classColonProtectionRAIIObject;/// PrettyStackTraceParserEntry - If a crash happens while the parser is active,/// an entry is printed for it.classPrettyStackTraceParserEntry:publicllvm::PrettyStackTraceEntry{constParser&P;public:PrettyStackTraceParserEntry(constParser&p):P(p){}virtualvoidprint(llvm::raw_ostream&OS)const;};/// Parser - This implements a parser for the C family of languages. After/// parsing units of the grammar, productions are invoked to handle whatever has/// been read.///classParser{friendclassPragmaUnusedHandler;friendclassColonProtectionRAIIObject;PrettyStackTraceParserEntryCrashInfo;Preprocessor&PP;/// Tok - The current token we are peeking ahead. All parsing methods assume/// that this is valid.TokenTok;// PrevTokLocation - The location of the token we previously// consumed. This token is used for diagnostics where we expected to// see a token following another token (e.g., the ';' at the end of// a statement).SourceLocationPrevTokLocation;unsigned