Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Jun 2000 22:58:12 +0400
From:      "Artem Koutchine" <matrix@ipform.ru>
To:        <chat@freebsd.org>
Subject:   BISON & flex
Message-ID:  <000f01bfe132$d04a2e00$0c00a8c0@ipform.ru>

next in thread | raw e-mail | index | archive | help
Hi!

I have a need to create my own BASIC-like language for html
templates (an embedded language that is) which
must be interpreted into perl.  Here is what it look like:

<HTML>
<BODY>
<!--EDTL FOR EACH PRODUCT AS A IN CATEGORY CATEGORYID_BY_NAME('books')
PRINT A.NAME+" "+ROUND(A.PRICE,2);
PRINT "<BR>"
NEXT PRODUCT
-->
Hello world!
</BODT>
</HTML

Which would eventually print a list of books and show name and price for
each one. But after
running the parser it will get to something like:
#!/usr/bin/perl -w
use Products;
use DBI;

print "Content-type: text/html\n";
print ...
and so on...

or may be even embeded perl.

Can anybodt tell me will FLEX+BISON be the right tools for this kind of
task? Are there any
good tutorials for bison and flex, cause, maybe i am stupid and lazy, but i
cannot really do
anything usefull after reading the bison docs.

Thanks!
Artem



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-chat" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000f01bfe132$d04a2e00$0c00a8c0>