Page 2 of 2

Posted: Thu Dec 15, 2005 5:19 pm
by alex.barylski
feyd wrote:I feel a string parser would fair a lot easier and faster (performance) to do this task.
I can't say i'm familiar with what a string parser is??? :?

Posted: Thu Dec 15, 2005 5:22 pm
by Ambush Commander
Maybe i'll just use the PHP tokenizer
A very good idea. ;)
I can't say i'm familiar with what a string parser is???
You build it totally out of PHP. A search string parsing example can be found here (along with a competing, regexp solution) as well as another example built for parsing HTML.

Posted: Thu Dec 15, 2005 5:23 pm
by alex.barylski
Ambush Commander wrote:Would you like me to write one?
Indeed :)

But what you mean string parser?

Your going to write an EBNF grammar and parsing framework in PHP???

Or a more trivial PHP class which knows only the rules which I stipulate earlier???

Is that what Feyd meant? That was kinda the route I was hoping to avoid, because locating statements is JUST one task of many which I wanted to perform on the source code... :?

It would be easier to just use the tokenizer functions...which I think i'm going to do anyways...originally I didn't want to...cuz the version of PHP I have installed on my local machine doesn't support tokenizer functions....but I guess thats easy enough to solve :)

Cheers :)

Posted: Thu Dec 15, 2005 5:27 pm
by Ambush Commander
Or a more trivial PHP class which knows only the rules which I stipulate earlier???
That one.

The PHP language isn't too hairy to deal with, but lexically speaking, why bother when you can have PHP's real lexer do it for you? I think, comparing the time tradeoff, that you'll get more bang for your buck installing a later version of PHP. I recommend 4.3.11.

I probably won't write one for you actually.

By the way...
Is that what Feyd meant? That was kinda the route I was hoping to avoid, because locating statements is JUST one task of many which I wanted to perform on the source code...
And how would you go about reusing that regexp? ;)

Posted: Thu Dec 15, 2005 5:27 pm
by alex.barylski
Ambush Commander wrote:
Maybe i'll just use the PHP tokenizer
A very good idea. ;)
I can't say i'm familiar with what a string parser is???
You build it totally out of PHP. A search string parsing example can be found here (along with a competing, regexp solution) as well as another example built for parsing HTML.
Thats what I thought you/Feyd meant...

I haven't attempted anything of the like since my introduction to CFG grammars a few years back...now i'm spoiled...and would have a hard time spending time writing one by hand...

Not an ideal solution...but...

For speed it would certainly be better than regex...not to mention possible :)

Posted: Thu Dec 15, 2005 5:28 pm
by Ambush Commander
Quite a bit of post phasing, hmm? Well, read my earlier post. Tokenizing all the way.

Posted: Thu Dec 15, 2005 9:48 pm
by alex.barylski
Ambush Commander wrote:Quite a bit of post phasing, hmm? Well, read my earlier post. Tokenizing all the way.
Problem is...the verison on my computer is 2.4 or some stupid thing...so I don't have PHP tokenizing functions...

Speaking of which...

I have used phpDev for a while now, but clearly that project has fallen off the face of the earth and sucks...

Know of any other PHP triad project for Windows...which wouldn't require me to install a thing and work right from install with no configuring???

I am too lazy and don't have the time or interest to go learning anything past the basic understanding of PHP/MySQL/Apache administration...so phpDev was ideal for me...

Suggestions???

Posted: Fri Dec 16, 2005 3:16 pm
by Ambush Commander
Actually, it's really the MySQL setup (and making 4.1's passwords work with 4.0), which was the main problem with me. If you want, you can start a new thread and get your PHP up to date. You are missing out on a lot with such an ancient version.

Posted: Fri Dec 16, 2005 7:47 pm
by alex.barylski
Ambush Commander wrote:Actually, it's really the MySQL setup (and making 4.1's passwords work with 4.0), which was the main problem with me. If you want, you can start a new thread and get your PHP up to date. You are missing out on a lot with such an ancient version.
My website server has everything, but some times...I don't feel like cluttering my server with a bunch of projects...and then there's the fact...that some code...I like to keep confidential...having it on a shared host isn't a great idea :)

I think i'll check out that Xaamp (Apache friends) site :)