entrypoint :
{
integer total = sum(1, 10)
printinteger(total)
}
sum : integer begin, integer end -> integer ret = 0
{
while(begin < end)
{
ret += begin
++begin
}
}
foo :
{
complex i = 0, 1
assert(i * i == -1)
}
fib : 0 -> 1
fib : 1 -> 1
fib : integer n -> integer ret = fib(n - 1) + fib(n - 2)
I'll just leave this here:
Previous Entry
Quick Epoch stuffs
Next Entry
Gentlemen... BEHOLD!
Comments

February 14, 2012 09:33 AM

Btw, this is for you:
[code]
Seans-MacBook-Air:EpochCompiler washu$ nm EpochCompiler.dll | grep ByteCode | head -n 4
0000000000093e70 T _CompileSourceToByteCode
0000000000094310 T _FreeByteCodeBuffer
00000000000943f0 T _GetByteCodeBuffer
0000000000094450 T _GetByteCodeBufferSize
[/code]
EpochCompiler built on Mac OS-X with CLANG... had to remove the dependency on EpochVM. Fairly simple to remove too, since EpochCompiler only seems to rely on TypeInfo.cpp... that should probably be refactored and eliminated to simplify compilation and also make EpochCompiler more useful (i.e. be able to plug it into a jit or other interpretor than just EpochVM).
[code]
Seans-MacBook-Air:EpochCompiler washu$ nm EpochCompiler.dll | grep ByteCode | head -n 4
0000000000093e70 T _CompileSourceToByteCode
0000000000094310 T _FreeByteCodeBuffer
00000000000943f0 T _GetByteCodeBuffer
0000000000094450 T _GetByteCodeBufferSize
[/code]
EpochCompiler built on Mac OS-X with CLANG... had to remove the dependency on EpochVM. Fairly simple to remove too, since EpochCompiler only seems to rely on TypeInfo.cpp... that should probably be refactored and eliminated to simplify compilation and also make EpochCompiler more useful (i.e. be able to plug it into a jit or other interpretor than just EpochVM).
February 14, 2012 09:35 AM

I thought you might like this... wrote up a quick .net version of the parser and lexer. No syntax evaluation or anything, just produces an AST and then prints the AST...
[CODE]
Lexing took: 66ms
Parsing took: 0ms
Grammar
MetaEntities
Vector
Members
Member
real
X
Member
real
Y
Member
real
Z
Member
dot
ParamTypeSpec
Vector
Vector
float
entrypoint
Parameters
[/CODE]
[CODE]
Lexing took: 66ms
Parsing took: 0ms
Grammar
MetaEntities
Vector
Members
Member
real
X
Member
real
Y
Member
real
Z
Member
dot
ParamTypeSpec
Vector
Vector
float
entrypoint
Parameters
[/CODE]
February 17, 2012 04:47 AM
Advertisement
Latest Entries
A Few Farewells
15304 views
Code Reuse In Actual Practice
17305 views
Source-Level Debugging For Epoch Programs
5654 views
Using Poison to Reverse Engineer Code
4473 views
Using Poison to Reverse Engineer Code
373287 views
Debugging Information Success
3555 views
Debugging Information Success
6327 views
Debugging Epoch Programs
3783 views
Debugging Epoch Programs
8095 views
Epoch 64-bit compiler progress
3197 views
Advertisement
Advertisement
I have no trouble at all following the syntax and understanding what is being said by the code.