1 //===- AsmParser.h - Parser for Assembly Files ------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This class declares the parser for assembly files.
12 //===----------------------------------------------------------------------===//
32 AsmParser(SourceMgr &SM, MCContext &ctx, MCStreamer &OutStr)
33 : Lexer(SM), Ctx(ctx), Out(OutStr) {}
39 bool ParseStatement();
41 bool Error(SMLoc L, const char *Msg);
42 bool TokError(const char *Msg);
44 void EatToEndOfStatement();
46 bool ParseExpression(int64_t &Res);
47 bool ParsePrimaryExpr(int64_t &Res);
48 bool ParseBinOpRHS(unsigned Precedence, int64_t &Res);
49 bool ParseParenExpr(int64_t &Res);
52 bool ParseX86InstOperands(MCInst &Inst);
53 bool ParseX86Operand(X86Operand &Op);
54 bool ParseX86MemOperand(X86Operand &Op);
57 bool ParseDirectiveSection();
61 } // end namespace llvm