[C#] TLF# : A TLF programming language (well not quite) |
|
05-04-2012, 04:31 PM
|
|||
|
|||
|
TLF# : A TLF programming language (well not quite)
So, I will probably have to put this on my WishList, but I hope to eventually have time to pursue creating a simple language in depth. Currently all I've done is taken rules set by me and converted the code to C#.
Later if I decided to pursue it, it'd be a bit more technical, but I'd most likely use Mono or dive into something like this: http://msdn.microsoft.com/en-us/magazine/cc136756.aspx Any who, here's a pic of what I was playing around with. It's real simple, but could easily be expanded with a few more rules and logic. |
|||
|
05-04-2012, 04:35 PM
|
|||
|
|||
|
RE: TLF# : A TLF programming language (well not quite)
After looking at the screen shot, you'd think I just did a .Replace on the code... Lol. Here is a snippet to show otherwise:
Code: (SELECT ALL CODE) private void Process() |
|||
|
05-04-2012, 04:49 PM
|
|||
|
|||
|
RE: TLF# : A TLF programming language (well not quite)
Really, this can become awesome, though there is one thing that I don't like (actually make it 2)...
First is, it looks way too much like (Visual)Basic, second it's to long.... Start Sub => private void/int/string/etc... why not make it "c++ like", int => public int, ~int => private, -int protect... I know it's not really creative, but I just mean why not make it "shorter"... and less VB ;) All in all however, it's interesting to see what you'll do with it :D Why so Serious??? Play League of Legends with me...
|
|||
|
05-04-2012, 05:10 PM
(This post was last modified: 05-04-2012 05:11 PM by KoBE.)
|
|||
|
|||
|
RE: TLF# : A TLF programming language (well not quite)
Eh, I was simply trying out different stuff. I don't mean for this to look like any language in particular.
I don't have a plan for syntax at all. I just wanted to test out some parsing/lexing. If I were to pursue this further, I'd take a close look at what the syntax an stuff would or should be like. Since it'd obviously be simple, at least at first, I thought it'd be neat to make a gap between experience programming and novice. Letting them use TLF# to learn the basics. We'll see. I do also like your idea of it being shorter. So, might go that route too. Either way it'd be a while before I'd be able to devote time to this. |
|||
|
05-04-2012, 07:22 PM
|
|||
|
|||
|
RE: TLF# : A TLF programming language (well not quite)
lol, looks like something of a simplistic Visual Basic, or advanced Small Basic to me haha
![]() Microsoft MVP .NET Programming - (2012 - Present) ®Crestron DMC-T Certified Automation Programmer Development Site: aceinfinity.net |
|||
|
05-04-2012, 09:16 PM
|
|||
|
|||
|
RE: TLF# : A TLF programming language (well not quite)
Haha, yeah. Don't mind the syntax I used.. I could have used ANY. That's just what came to my head when I was playing around.
|
|||
|
05-04-2012, 10:08 PM
|
|||
|
|||
|
RE: TLF# : A TLF programming language (well not quite)
Syntax doesn't really matter, as long as it's simple to remember and you don't have conflictions, and you've got a nice parsing system to convert.
![]() Microsoft MVP .NET Programming - (2012 - Present) ®Crestron DMC-T Certified Automation Programmer Development Site: aceinfinity.net |
|||
|
11-15-2012, 07:10 AM
|
|||
|
|||
|
RE: TLF# : A TLF programming language (well not quite)
What type of object is TokenParser? Is it an enum?
And what does the Token class contain? Browsing through threads and was somehow intrigued by this one :) |
|||
|
11-15-2012, 02:02 PM
|
|||
|
|||
|
RE: TLF# : A TLF programming language (well not quite)
Unfortunelty, I lost this project with my others a few months ago..
The tokens type were identified by an enum similar to this Code: (SELECT ALL CODE) public enum TokensAnd they were added to a dictionary of type Token, string.. with the string being the regex pattern to determine the type of token Code: (SELECT ALL CODE) private readonly Dictionary<Tokens, string> _tokens;Tokens were added like so: Code: (SELECT ALL CODE) _tokens.Add(Tokens.START SUB, "[Ss][Tt][Aa][Rr][Tt][ \\t][Ss][Uu][Bb][^\\r\\n]*");TokenParser was the class that I used to keep track and parse the tokens. It contained the enum similar code to what I showed above. |
|||
Possibly Related Threads... |
| Thread: | Author | Replies: | Views: | Last Post | |
Open Source Dynamic Language Runtime - DLR |
AceInfinity | 5 | 138 |
05-24-2013 12:20 AM Last Post: _HAWK_ |
|
Parallel Programming in C# 4 |
KoBE | 3 | 232 |
03-07-2013 06:54 PM Last Post: AceInfinity |
|
C# - Official Programming Language of 2012! |
AceInfinity | 4 | 284 |
01-08-2013 05:52 AM Last Post: Adriana |
|
| Have A Little Fun With Programming Achievements! | AceInfinity | 11 | 710 |
08-05-2012 11:42 AM Last Post: KoBE |
|
| Need help with a software and programming language | Logistick | 1 | 234 |
06-22-2012 09:07 AM Last Post: KoBE |
|
| Users browsing this thread |
| 1 Guest(s) |

TLF# : A TLF programming language (well not quite)






