summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mc/AsmLexer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Split the TargetAsmParser "ParseInstruction" interface in half:Chris Lattner2010-01-141-1/+1
| | | | | | | | | | | the new ParseInstruction method just parses and returns a list of target operands. A new MatchInstruction interface is used to turn the operand list into an MCInst. This requires new/deleting all the operands, but it also gives targets the ability to use polymorphic operands if they want to. llvm-svn: 93469
* avoid copying MCAsmInfo by value, add an (extremely low prio) fixme.Chris Lattner2009-09-271-4/+2
| | | | llvm-svn: 82911
* Fixed some problems with the logic of parsing line comments by addingKevin Enderby2009-09-161-8/+11
| | | | | | | isAtStartOfComment and using that instead in two places where a loop to check if the char was in MAI.getCommentString(). llvm-svn: 82059
* Added AsmToken enum constants to MCAsmLexer.h for '[', ']', '{', and '}' inKevin Enderby2009-09-041-0/+4
| | | | | | | preparation of supporting other targets. Then changed the lexer to parse these as tokens. llvm-svn: 81050
* Added the AsmToken::Hash enum constant to MCAsmLexer.h in preparation ofKevin Enderby2009-09-041-5/+15
| | | | | | | | supporting other targets. Changed the code to pass MCAsmInfo to the parser and the lexer. Then changed the lexer to use CommentString from MCAsmInfo instead of a literal '#' character. llvm-svn: 81046
* Removed the non-target independent AsmToken::Register enum constantKevin Enderby2009-09-031-12/+1
| | | | | | | | | | from MCAsmLexer.h in preparation of supporting other targets. Changed the X86AsmParser code to reflect this by removing AsmLexer::LexPercent and looking for AsmToken::Percent when parsing in places that used AsmToken::Register. Then changed X86ATTAsmParser::ParseRegister to parse out registers as an AsmToken::Percent followed by an AsmToken::Identifier. llvm-svn: 80929
* llvm-mc: Move MCAsmToken::getLoc() into MC library where it belongs.Daniel Dunbar2009-08-141-4/+0
| | | | llvm-svn: 78980
* Make the big switch: Change MCSectionMachO to represent a section *semantically*Chris Lattner2009-08-101-0/+11
| | | | | | | | | | | | | | | | instead of syntactically as a string. This means that it keeps track of the segment, section, flags, etc directly and asmprints them in the right format. This also includes parsing and validation support for llvm-mc and "attribute(section)", so we should now start getting errors about invalid section attributes from the compiler instead of the assembler on darwin. Still todo: 1) Uniquing of darwin mcsections 2) Move all the Darwin stuff out to MCSectionMachO.[cpp|h] 3) there are a few FIXMEs, for example what is the syntax to get the S_GB_ZEROFILL segment type? llvm-svn: 78547
* Expose Tokens to target specific assembly parsers.Daniel Dunbar2009-07-281-1/+0
| | | | llvm-svn: 77337
* Drop some AsmLexer methods in favor of their AsmToken equivalents.Daniel Dunbar2009-07-281-0/+4
| | | | llvm-svn: 77323
* llvm-mc: Sink token enum into AsmToken.Daniel Dunbar2009-07-281-41/+41
| | | | llvm-svn: 77322
* llvm-mc: Factor AsmToken class out of AsmLexer.Daniel Dunbar2009-07-281-59/+60
| | | | llvm-svn: 77292
* llvm-mc: Stop uniqueing string tokens, nothing actually uses this.Daniel Dunbar2009-07-281-17/+3
| | | | llvm-svn: 77287
* Convert StringMap to using StringRef for its APIs.Daniel Dunbar2009-07-231-6/+9
| | | | | | | | | | | | - Yay for '-'s and simplifications! - I kept StringMap::GetOrCreateValue for compatibility purposes, this can eventually go away. Likewise the StringMapEntry Create functions still follow the old style. - NIFC. llvm-svn: 76888
* implement .include in the lexer/parser instead of passing it into the streamer.Chris Lattner2009-07-161-0/+19
| | | | llvm-svn: 75896
* Normalize SourceMgr messages.Daniel Dunbar2009-06-301-3/+4
| | | | | | | | | | | | - Don't print "Parsing" in front of every message. - Take additional "type" argument which is prepended to the message (with ": ") if given. - Update clients to print errors (warnings) as: <filename>:<line number>: error(warning): ... llvm-svn: 74489
* llvm-mc: Recognize C++ style comments.Daniel Dunbar2009-06-291-5/+9
| | | | llvm-svn: 74462
* MC: Improve expression parsing and implement evaluation of absolute expressions.Daniel Dunbar2009-06-291-14/+25
| | | | llvm-svn: 74448
* MC: Parse .set and assignments.Daniel Dunbar2009-06-251-0/+1
| | | | llvm-svn: 74208
* make the lexer unique strings it lexes instead of passing them back asChris Lattner2009-06-241-3/+21
| | | | | | std::strings. llvm-svn: 74036
* implement a trivial binary expression parser, we can now parse all of ↵Chris Lattner2009-06-231-3/+22
| | | | | | 176.gcc.llc.s llvm-svn: 73950
* get a definition of strull on windows, thanks to Howard Su.Chris Lattner2009-06-231-0/+1
| | | | llvm-svn: 73929
* Include cstdio to get EOF, needed with gcc-4.4.Duncan Sands2009-06-221-1/+2
| | | | llvm-svn: 73879
* Implement full support for parsing primary expressions. We can now parseChris Lattner2009-06-221-0/+1
| | | | | | | | | | | all of health and voronoi (ignoring directives). We only get 409 lines into 176.gcc though because we don't have binary operators yet: Parsing 176.gcc.llc.s:409: unexpected token in operand list movsbl _arityvec+1(,%edi,8), %eax ^ llvm-svn: 73877
* rename SourceMgr::PrintError to PrintMessage.Chris Lattner2009-06-211-11/+5
| | | | llvm-svn: 73861
* stub out parser for asm files. Change invariant on lexer to alwaysChris Lattner2009-06-211-6/+5
| | | | | | | | print its error message when it returns an asmtok::Error token. Compute a proper error code for llvm-mc in 'lex' mode. Add new -as-lex option to enable lexing mode (vs parsing mode). llvm-svn: 73859
* add string literals.Chris Lattner2009-06-211-1/+24
| | | | llvm-svn: 73858
* hopefully fix the build on linux.Chris Lattner2009-06-211-0/+1
| | | | llvm-svn: 73857
* implement enough of a lexer to get through Olden/health/Output/health.llc.sChris Lattner2009-06-211-5/+157
| | | | | | without errors. llvm-svn: 73855
* some baby steps.Chris Lattner2009-06-211-0/+87
llvm-svn: 73848
OpenPOWER on IntegriCloud