Displaying 6 results from an estimated 6 matches for "getnexttoken".
2010 Feb 17
2
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...ic:
FunctionAST(PrototypeAST *proto, ExprAST *body)
: Proto(proto), Body(body) {}
Function *Codegen();
};
//===----------------------------------------------------------------------===//
// Parser
//===----------------------------------------------------------------------===//
/// CurTok/getNextToken - Provide a simple token buffer. CurTok is the current
/// token the parser it looking at. getNextToken reads another token from the
/// lexer and updates CurTok with its results.
static int CurTok;
static int getNextToken() {
return CurTok = gettok();
}
/// BinopPrecedence - This holds the pr...
2010 Feb 17
0
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...gt; : Proto(proto), Body(body) {}
>
> Function *Codegen();
> };
>
>
> //===----------------------------------------------------------------------===//
> // Parser
>
> //===----------------------------------------------------------------------===//
>
> /// CurTok/getNextToken - Provide a simple token buffer. CurTok is the
> current
> /// token the parser it looking at. getNextToken reads another token from
> the
> /// lexer and updates CurTok with its results.
> static int CurTok;
> static int getNextToken() {
> return CurTok = gettok();
> }
&...
2010 Feb 17
1
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...;
>> Function *Codegen();
>> };
>>
>>
>> //===----------------------------------------------------------------------===//
>> // Parser
>>
>> //===----------------------------------------------------------------------===//
>>
>> /// CurTok/getNextToken - Provide a simple token buffer. CurTok is the
>> current
>> /// token the parser it looking at. getNextToken reads another token from
>> the
>> /// lexer and updates CurTok with its results.
>> static int CurTok;
>> static int getNextToken() {
>> return...
2011 Feb 08
1
[LLVMdev] Question about linker error
...public ExprAST {
std::string Name;
ExprAST *Init;
public:
GlobalExprAST(const std::string &name, ExprAST *init)
: Name(name), Init(init) {}
virtual Value *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
2010 Jan 22
3
[LLVMdev] Kaleidoscope-tutorial: Fails to create the JIT
...(demo-code) found the that the JIT can't be build/
created,/loaded/...
Which result's in a null-pointer for "TheExecutionEngine"; which
explains the bus-errror ..
The main code is
|| ... //GAM some setting of vars
|| fprintf(stderr, "ready> ");
|| getNextToken();
||
|| // Make the module, which holds all the code.
|| TheModule = new Module("my cool jit", getGlobalContext());
|| //GAM: check TheModule: it's a valid pointer
||
|| // create the JIT.
|| TheExecutionEngine = EngineBuilder(TheModule).create();
|| //GAM: check...
2010 Jan 22
0
[LLVMdev] Kaleidoscope-tutorial: Fails to create the JIT
...ich result's in a null-pointer for "TheExecutionEngine"; which
> explains the bus-errror ..
>
> The main code is
> || ... //GAM some setting of vars
> || fprintf(stderr, "ready> ");
> || getNextToken();
> ||
> || // Make the module, which holds all the code.
> || TheModule = new Module("my cool jit", getGlobalContext());
> || //GAM: check TheModule: it's a valid pointer
> ||
> || // create the JIT.
> || TheExecutionEngine = EngineBuilder(TheModule).c...