Displaying 4 results from an estimated 4 matches for "getlex".
Did you mean:
getldt
2010 Jun 21
2
[LLVMdev] MC: Object file specific parsing
...nclude "llvm/ADT/OwningPtr.h"
@@ -35,18 +35,9 @@ enum ShiftType {
Rrx
};
-class ARMAsmParser : public TargetAsmParser {
- MCAsmParser &Parser;
+class ARMAsmParser : public MachOAsmParser {
private:
- MCAsmParser &getParser() const { return Parser; }
-
- MCAsmLexer &getLexer() const { return Parser.getLexer(); }
-
- void Warning(SMLoc L, const Twine &Msg) { Parser.Warning(L, Msg); }
-
- bool Error(SMLoc L, const Twine &Msg) { return Parser.Error(L, Msg); }
-
bool MaybeParseRegister(OwningPtr<ARMOperand> &Op, bool ParseWriteBack);
bool Pars...
2015 Nov 26
2
Accessing TableGen defined variable in the cpp code
...e class in TableGen:
*bits<4> bitpattern = 0;*
*let Inst{10-7} = bitpattern;*
Then, at the moment that I am parsing the instruction, I would like to
assign a value to "bitpattern" variable!
for example:
->ParseInstruction(...)
if (Mnemonic == "X")
Mnemonic = getLexer().getTok().getString();
if (Mnemonic == "Y")
*** let bitpattern = 0b1010" ** // How can I do this?*
How can I do this? Is it possible?
Cheers,
ES
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm...
2015 Sep 28
2
Parse Instruction
....
I would like to parse an assembly code that is space-separated and I am
having a bit of problem.
In *ParseInstruction* function, I don't know what is the easiest way to
figure out how many operands a mnemonic expected to have.
In comma-separated assembly code, it just consuming commas (while
(getLexer().is(AsmToken::Comma))) and adds operands, but it's not the case
for space...
I have a dirty hack, that I manually provide such information (number of
operands) in a function called for example getMnemonicAcceptInfo and with a
for loop I parse the operand!!
What would you suggest for parsin...
2015 Sep 28
3
Parse Instruction
...is space-separated and
> I am having a bit of problem.
> In *ParseInstruction* function, I don't know what is the easiest
> way to figure out how many operands a mnemonic expected to have.
> In comma-separated assembly code, it just consuming commas (while
> (getLexer().is(AsmToken::Comma))) and adds operands, but it's not
> the case for space...
>
> I have a dirty hack, that I manually provide such information
> (number of operands) in a function called for example
> getMnemonicAcceptInfo and with a for loop I parse the oper...