Page 4 of 4

Re: ExC: Custom programming language

Posted: Fri Mar 03, 2017 4:00 pm
by Elttob
Small update; working on creating an AST from a queue of tokens. Each AST component has a parent (except for root) and children, creating a hierachial tree. AST components can also have metadata (this is currently used in functions to store name, return type and access level)

Image

Re: ExC: Custom programming language

Posted: Fri Mar 03, 2017 8:47 pm
by dchapiesky
You may wish to look at this...

http://www.antlr.org/

cheers

Re: ExC: Custom programming language

Posted: Sat Mar 04, 2017 4:05 am
by Elttob
Thanks for providing the link, but I'd rather make the parser and such manually, since I don't want to miss out on the experience that I could probably use in the future :p

Re: ExC: Custom programming language

Posted: Fri Mar 10, 2017 3:56 am
by Solar
Actually, the experience you probably could use in the future would be using parser generators. Bison, ANTLR, Boost.Spirit. If you're writing your own parser, for your own programming language, for your own OS, you're looking at tripple reinvention of the wheel.

Next thing you'll design your own language for programming your own parser for your own different language... and then design your own text editor for programming.... it has to stop at some point. ;-)

Re: ExC: Custom programming language

Posted: Fri Mar 10, 2017 4:22 am
by Elttob
Solar wrote:Actually, the experience you probably could use in the future would be using parser generators. Bison, ANTLR, Boost.Spirit. If you're writing your own parser, for your own programming language, for your own OS, you're looking at tripple reinvention of the wheel.

Next thing you'll design your own language for programming your own parser for your own different language... and then design your own text editor for programming.... it has to stop at some point. ;-)
Yeah lol. I'll probably stop at OS though :p
Reinventing the wheel is kinda fun tho

Re: ExC: Custom programming language

Posted: Sun Mar 19, 2017 4:13 pm
by Octacone
Can I create classes and access functions and objects using the dot operator? Does it support operation overloading? Can you use voids (any other function types) with structs? Is there a way to test this language out? Also I really really like its name. Keep working no matter what people say. Sometimes you do stuff because you want to learn something / have fun. My personal opinion is that you should make it more like C# and less like C++. This should be a combo of C and C#.

Re: ExC: Custom programming language

Posted: Sat Mar 25, 2017 2:43 pm
by Elttob
octacone wrote:Can I create classes and access functions and objects using the dot operator? Does it support operation overloading? Can you use voids (any other function types) with structs? Is there a way to test this language out? Also I really really like its name. Keep working no matter what people say. Sometimes you do stuff because you want to learn something / have fun. My personal opinion is that you should make it more like C# and less like C++. This should be a combo of C and C#.
ExC doesn't support classes atm, and pointers are still a big work in progress, so I can't say much there except I do want pointers to be able to point to anything, and to have a fairly legible syntax (originally I was going to do something like "int pointer var = 5;" but then how would it handle pointers to pointers and such). I am working on a way to test the language; the compiler will spit out an assembly-like bytecode which you'll be able to put either into a second compiler (to turn into assembly) or VM (VM is what I've decided to do first since it's more platform independent and I can use it to start testing the language's syntax for real).