MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: Tag syntax - multiple ways?



******    message to minivend-users from mikeh@minivend.com     ******

Quoting Thompson-Jordan (thompson-jordan@mci2000.com):
> ******    message to minivend-users from Thompson-Jordan <thompson-jordan@mci2000.com>     ******
> 
> When you say do not use the old parser, how does that relate to the syntax?
> I'm not clear exactly how the parser and the syntax are related. The new
> parser parses the old syntax, just not as well?
> 
> Should I only use both the [page href="example"] and <A MV="page example"
> HREF="example.html"> syntax? The second form seems to use the old syntax
> within the MV="page example" construct. Should I only use the [page
> href="example"] syntax? Use only the <A MV="page example"
> HREF="example.html"> syntax? Use one preferably? Either, it doesn't matter?

The *syntax* doesn't matter. The parser does.

MiniVend, for convenience, has a positional syntax available. The new
parser reads this just fine as long as the parameter PosNumber (number
of positional parameters) in the tag definition is correct.

This is mostly useful for things like:

	[if value whatever =~ /something/]

Much easier than 

	[if type=value
	    term=whatever
		op="=~"
		compare="something"      ]

and much easier to read.

Also, [value email] instead of [value name="email"] seems to be 
easier to read.

The problem comes in when you are trying to send possibly multi-word
things to a tag. The named parameters allow a pretty easy parsing
along with unambiguous presentation of arguments. Using quotes is something
that is quite difficult to do fast, which is why you can't do:

	[if value "some param"]

in Minivend. While it would be eminently possible given a 
state-based lexer, that would require either compiled C or a
much slower parse. So I tried to go for speed, readability, and
flexibility. Maybe I am trying too hard. 8-)

-- 
Mike Heins                          http://www.minivend.com/  ___ 
                                    Internet Robotics        |_ _|____
Clothes make the man.  Naked        131 Willow Lane, Floor 2  | ||  _ \
people have little or no            Oxford, OH  45056         | || |_) |
influence on society.               <mikeh@minivend.com>     |___|  _ <
 -- Mark Twain                      513.523.7621 FAX 7501        |_| \_\
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: