Displaying 4 results from an estimated 4 matches for "parsedefinition".
2008 Feb 22
1
[LLVMdev] tutorial typos
...ypeAST {
std::string Name;
- std::vector< Args;
+ std::vector<std::string> Args;
public:
PrototypeAST(const std::string &name, const
std::vector<std::string> &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<());
+ PrototypeAST *Proto = new PrototypeAST("",
std::vector<std::string>...
2010 Feb 17
2
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...s.push_back(IdentifierStr);
if (CurTok != ')')
return ErrorP("Expected ')' in prototype");
// success.
getNextToken(); // eat ')'.
return new PrototypeAST(FnName, ArgNames);
}
/// definition ::= 'def' prototype expression
static FunctionAST *ParseDefinition() {
getNextToken(); // eat def.
PrototypeAST *Proto = ParsePrototype();
if (Proto == 0) return 0;
if (ExprAST *E = ParseExpression())
return new FunctionAST(Proto, E);
return 0;
}
/// toplevelexpr ::= expression
static FunctionAST *ParseTopLevelExpr() {
if (ExprAST *E = ParseExpr...
2010 Feb 17
0
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...')')
> return ErrorP("Expected ')' in prototype");
>
> // success.
> getNextToken(); // eat ')'.
>
> return new PrototypeAST(FnName, ArgNames);
> }
>
> /// definition ::= 'def' prototype expression
> static FunctionAST *ParseDefinition() {
> getNextToken(); // eat def.
> PrototypeAST *Proto = ParsePrototype();
> if (Proto == 0) return 0;
>
> if (ExprAST *E = ParseExpression())
> return new FunctionAST(Proto, E);
> return 0;
> }
>
> /// toplevelexpr ::= expression
> static FunctionAST *Par...
2010 Feb 17
1
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
..."Expected ')' in prototype");
>>
>> // success.
>> getNextToken(); // eat ')'.
>>
>> return new PrototypeAST(FnName, ArgNames);
>> }
>>
>> /// definition ::= 'def' prototype expression
>> static FunctionAST *ParseDefinition() {
>> getNextToken(); // eat def.
>> PrototypeAST *Proto = ParsePrototype();
>> if (Proto == 0) return 0;
>>
>> if (ExprAST *E = ParseExpression())
>> return new FunctionAST(Proto, E);
>> return 0;
>> }
>>
>> /// toplevelexpr ::=...