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

From: Date: Thu, 07 Apr 2005 04:36:03 +0000
Subject: Re: Adding Loop / If support to a simple template engine
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-212505@lists.php.net to get a copy of this message
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

« previous php.general (#212505) next »