search for: parseexpression

Displaying 10 results from an estimated 10 matches for "parseexpression".

Did you mean: parse_expression
2015 Feb 05
4
[LLVMdev] Fwd: [cfe-dev] freebsd-mips64 unhandled .cpsetup
Moving to llvmdev, as this is not a clang issue. David > Begin forwarded message: > > Date: 5 February 2015 17:00:34 GMT > From: Sean Bruno <sbruno at ignoranthack.me> > To: cfe-dev at cs.uiuc.edu > Subject: [cfe-dev] freebsd-mips64 unhandled .cpsetup > Reply-To: sbruno at freebsd.org > > > I'm taking a journey to try and get a clang/llvm build of
2009 Oct 01
3
[LLVMdev] PHI and Allocas
...ne value only, the result of: Value *ThenV = Then->Codegen(); (...) Value *ElseV = Else->Codegen(); (...) PN->addIncoming(ThenV, ThenBB); PN->addIncoming(ElseV, ElseBB); But both Then and Else are expressions, so the Value returned is in the form of a single variable. ExprAST *Then = ParseExpression(); (...) ExprAST *Else = ParseExpression(); In my toy language, I accept any number of statements inside a block. Ignoring nested if statements, should I keep track of *each* variable mutation inside the block, or is there some LLVM magic (as I'm getting used to)? A simple C example would be...
2010 Feb 17
2
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
.../ Error* - These are little helper functions for error handling. ExprAST *Error(const char *Str) { fprintf(stderr, "Error: %s\n", Str);return 0;} PrototypeAST *ErrorP(const char *Str) { Error(Str); return 0; } FunctionAST *ErrorF(const char *Str) { Error(Str); return 0; } static ExprAST *ParseExpression(); /// identifierexpr /// ::= identifier /// ::= identifier '(' expression* ')' static ExprAST *ParseIdentifierExpr() { std::string IdName = IdentifierStr; getNextToken(); // eat identifier. if (CurTok != '(') // Simple variable ref. return new VariableExpr...
2010 Feb 17
0
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...elper functions for error handling. > ExprAST *Error(const char *Str) { fprintf(stderr, "Error: %s\n", > Str);return 0;} > PrototypeAST *ErrorP(const char *Str) { Error(Str); return 0; } > FunctionAST *ErrorF(const char *Str) { Error(Str); return 0; } > > static ExprAST *ParseExpression(); > > /// identifierexpr > /// ::= identifier > /// ::= identifier '(' expression* ')' > static ExprAST *ParseIdentifierExpr() { > std::string IdName = IdentifierStr; > > getNextToken(); // eat identifier. > > if (CurTok != '(') // Simp...
2010 Feb 17
1
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...r handling. >> ExprAST *Error(const char *Str) { fprintf(stderr, "Error: %s\n", >> Str);return 0;} >> PrototypeAST *ErrorP(const char *Str) { Error(Str); return 0; } >> FunctionAST *ErrorF(const char *Str) { Error(Str); return 0; } >> >> static ExprAST *ParseExpression(); >> >> /// identifierexpr >> ///   ::= identifier >> ///   ::= identifier '(' expression* ')' >> static ExprAST *ParseIdentifierExpr() { >>  std::string IdName = IdentifierStr; >> >>  getNextToken();  // eat identifier. >> >...
2009 Oct 01
0
[LLVMdev] PHI and Allocas
...en->Codegen(); > (...) > Value *ElseV = Else->Codegen(); > (...) > PN->addIncoming(ThenV, ThenBB); > PN->addIncoming(ElseV, ElseBB); > > But both Then and Else are expressions, so the Value returned is in > the form of a single variable. > > ExprAST *Then = ParseExpression(); > (...) > ExprAST *Else = ParseExpression(); > > In my toy language, I accept any number of statements inside a block. > > Ignoring nested if statements, should I keep track of *each* variable > mutation inside the block, or is there some LLVM magic (as I'm getting >...
2011 Feb 08
1
[LLVMdev] Question about linker error
...e *Codegen(); }; /// Parser /// ::= 'global' identifier ('=' expression)? static ExprAST *ParseGlobalExpr() { getNextToken(); std::string Name = IdentifierStr; getNextToken(); ExprAST *Init = 0; if (CurTok == '=') { getNextToken(); Init = ParseExpression(); if (Init == 0) return 0; } return new GlobalExprAST(Name, Init); } Any help would be much appreaciated! Anton
2015 Feb 16
2
[LLVMdev] [cfe-dev] freebsd-mips64 unhandled .cpsetup
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 02/09/15 09:09, Toma Tabacu wrote: > >> Toma: >> >> Hey, I'm the bsd nerd trying to get our mips target switched over >> to clang/llvm. I looked at switching the mips asm parser over >> to parseExpression() but I am unfamiliar with the syntax to do >> this for .cpsetup. >> >> If you do look into this, let me know and I'll bang on it in my >> clang36 pre-release tree. >> >> sean >> > > Hi, > > I've managed to replace parseIdentifier(...
2010 Jun 21
2
[LLVMdev] MC: Object file specific parsing
...ve"); - - // Handle the identifier as the key symbol. - MCSymbol *Sym = CreateSymbol(Name); - - if (Lexer.isNot(AsmToken::Comma)) - return TokError("unexpected token in '.lsym' directive"); - Lex(); - - const MCExpr *Value; - SMLoc StartLoc = Lexer.getLoc(); - if (ParseExpression(Value)) - return true; - - if (Lexer.isNot(AsmToken::EndOfStatement)) - return TokError("unexpected token in '.lsym' directive"); - - Lex(); - - // We don't currently support this directive. - // - // FIXME: Diagnostic location! - (void) Sym; - return TokError(&...
2008 Feb 22
1
[LLVMdev] tutorial typos
...d::string&gt; Args; public: PrototypeAST(const std::string &amp;name, const std::vector&lt;std::string&gt; &amp;args) : Name(name), Args(args) {} @@ -1132,7 +1132,7 @@ static FunctionAST *ParseDefinition() { static FunctionAST *ParseTopLevelExpr() { if (ExprAST *E = ParseExpression()) { // Make an anonymous proto. - PrototypeAST *Proto = new PrototypeAST("", std::vector&lt;()); + PrototypeAST *Proto = new PrototypeAST("", std::vector&lt;std::string&gt;()); return new FunctionAST(Proto, E); } return 0;