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)
🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
I'll just leave this here:
Previous Entry
Quick Epoch stuffs
Next Entry
Gentlemen... BEHOLD!
Comments
![Washu](https://uploads.gamedev.net/profile/large.photo-14890.jpg)
February 14, 2012 09:33 AM
![Washu](https://uploads.gamedev.net/profile/large.photo-14890.jpg)
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
![Washu](https://uploads.gamedev.net/profile/large.photo-14890.jpg)
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
14561 views
Code Reuse In Actual Practice
16415 views
Source-Level Debugging For Epoch Programs
4948 views
Using Poison to Reverse Engineer Code
154204 views
Using Poison to Reverse Engineer Code
3585 views
Debugging Information Success
2889 views
Debugging Information Success
5433 views
Debugging Epoch Programs
3107 views
Debugging Epoch Programs
7408 views
Epoch 64-bit compiler progress
2600 views
Advertisement
I have no trouble at all following the syntax and understanding what is being said by the code.