Chris Lattner | 27aa7d2 | 2009-06-21 20:16:42 +0000 | [diff] [blame] | 1 | //===- AsmParser.h - Parser for Assembly Files ------------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This class declares the parser for assembly files. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef ASMPARSER_H |
| 15 | #define ASMPARSER_H |
| 16 | |
| 17 | #include "AsmLexer.h" |
| 18 | |
| 19 | namespace llvm { |
| 20 | |
| 21 | class AsmParser { |
| 22 | AsmLexer Lexer; |
| 23 | |
| 24 | public: |
| 25 | AsmParser(SourceMgr &SM) : Lexer(SM) {} |
| 26 | ~AsmParser() {} |
| 27 | |
| 28 | bool Run(); |
| 29 | |
Chris Lattner | b0789ed | 2009-06-21 20:54:55 +0000 | [diff] [blame] | 30 | private: |
| 31 | bool ParseStatement(); |
| 32 | |
Chris Lattner | 14ee48a | 2009-06-21 21:22:11 +0000 | [diff] [blame] | 33 | bool Error(SMLoc L, const char *Msg); |
| 34 | bool TokError(const char *Msg); |
Chris Lattner | 27aa7d2 | 2009-06-21 20:16:42 +0000 | [diff] [blame] | 35 | }; |
| 36 | |
| 37 | } // end namespace llvm |
| 38 | |
| 39 | #endif |