TParser

Community Forums/Showcase/TParser

Perturbatio(Posted 2005) [#1]
I was playing around over the christmas period with various things and this kind of spawned itself, it's pretty much uncommented, and probably a completely crap way of doing it but what the heck.
Feel free to post changes, suggestions and/or additions to it here.

The code:



The content of test2.txt:
Print test2
var test = "TestVar"
Print test



Brucey(Posted 2005) [#2]
Shoudln't ~n be a delimiter too... or ~r be whitespace?
I don't think my editors use ~r for linebreaks by default.

It works nice tho
:-)


Perturbatio(Posted 2005) [#3]
In Linux and OSX it's just a linefeed character in win32 it's a Carriage Return + Line Feed so a platform check would probably be necessary.
Should be easy to sort with ?Win32 ?MacOS ?Linux ? though.

*EDIT*
I suppose swapping them around would solve it easy enough.

i.e. ~n as a delimiter and ~r as whitespace.