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 / New Tokenizer - Made for codes

Author
Message
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 23rd Dec 2006 18:20
Yet another small achievement in my everlasting quest to make the ultimate programming language

Unlike my last tokenizer, which basically took a string, and got each chuck, depending on which letter you wanted to split up the line. This one is different, and is used for source codes.

i.e. if I had this code:


These are the sections it would be split up into, and the token type (integer)


which then can all be used as data for whatever you wish to do with it.

Here's the DBPro code with a very simple demonstration.


Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 1st Jan 2007 02:42
A parenthesis isn't so much of an operator as it is a grouping character.

Still, it looks handy for anyone wanting to write a scripting engine.

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 1st Jan 2007 02:53
True, but there was no point in making a completelly seperate.. thing...

Login to post a reply

Server time is: 2024-11-22 23:11:21
Your offset time is: 2024-11-22 23:11:21