Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Another Parser

Author
Message
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 1st Feb 2007 03:16
Still on my quest to make a programming language that will win the nobel prize... It will happen.. I know it will! Ahh!!!!

Anyway!! *Doo doo*

My last one (the tokenizer thing) would turn something like this:

into


Well, this one's similar - instead it groups up some tokens. I.e., negative numbers will become one token. So will floats. And also everything enclosed between apostrophes ( ' ) and inverted commas ( " ) will become one token.
So that same expression would turn into a more useful:


Now, one can continue to make ones programming language!


Here is your code:


Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 2nd Feb 2007 02:49
Have they ever given a Nobel to the inventor of a language?

As a side bit of random information, I think it was a woman who came up with Cobol.

Login to post a reply

Server time is: 2024-11-23 00:28:27
Your offset time is: 2024-11-23 00:28:27