OSDev.org
https://forum.osdev.org/

ExC: Custom programming language
https://forum.osdev.org/viewtopic.php?f=13&t=31364
Page 4 of 4

Author:  Elttob [ Fri Mar 03, 2017 4:00 pm ]
Post subject:  Re: ExC: Custom programming language

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

Author:  dchapiesky [ Fri Mar 03, 2017 8:47 pm ]
Post subject:  Re: ExC: Custom programming language

You may wish to look at this...

http://www.antlr.org/

cheers

Author:  Elttob [ Sat Mar 04, 2017 4:05 am ]
Post subject:  Re: ExC: Custom programming language

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

Author:  Solar [ Fri Mar 10, 2017 3:56 am ]
Post subject:  Re: ExC: Custom programming language

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. ;-)

Author:  Elttob [ Fri Mar 10, 2017 4:22 am ]
Post subject:  Re: ExC: Custom programming language

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

Author:  Octacone [ Sun Mar 19, 2017 4:13 pm ]
Post subject:  Re: ExC: Custom programming language

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#.

Author:  Elttob [ Sat Mar 25, 2017 2:43 pm ]
Post subject:  Re: ExC: Custom programming language

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).

Page 4 of 4 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/