Re: Adding Loop / If support to a simple template engine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, April 6, 2005 8:07 pm, James Williams said:
> Thanks everybody, but is this not already a really simple parser?

I dunno what a CS Major would say, even though I was one, once upon a
time, but I'd say "No."

I don't call it a parser until you start tearing apart the text, and
making decisions about what to *DO* in your script, based on what you see
in the text.

In other words, for me to call it a parser, you need to be:

Reading a character/word at a time looking for special words.
Having some kind of if/switch construct which does something different
based on the character you find.

So far, you're only doing one thing:  Finding {} and replacing variables.

That's just my personal definition which may or may not match CS standards.

YMMV

NAIAA

IANACSMASIDHTKTS
(I am not a CS Major anymore so I don't have to know this stuff)

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux