You are here: Re: Coding a User-Editable Pseudo-Language in PHP « All PHP « IT news, forums, messages
Re: Coding a User-Editable Pseudo-Language in PHP

Posted by Stefan Rybacki on 09/28/23 11:46

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

zacware schrieb:
> I'm writing a product configuration system in PHP. I have a list rules
> to code, as if part A is added, then parts B and C need to be added as
> well. etc, etc.
>
> The rules change quite a bit as the products are refined, so I thought
> it would be really if I could give the product managers a little
> mini-language where they could build their own if-statements and other
> simple rules without having to come back to me to recode everything. I
> would write a DHTML interface that would be sort of a "script-builder"
> for them, and it would check for correct syntax before saving
>
> Has anyone ever seen anything like this done in PHP? I've started
> sketching out how I'm going to do it myself but it sure is a big task.
> I'd hate to be reinventing the wheel
>
Well you can simply write your own parser for an easy language and a
little amount of commands. Or use a parser generator like this:
http://www.synflag.com/de/pub/products/ppage.php

What about XML, isn't your configuration doable in XML?

Regards
Stefan

> I figure I could let them enter raw php code and use the eval command
> on it, but that's somewhat dangerous! it would be safer to have a
> pseduo lanauge that would then be converted to php code in the
> background.
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (MingW32)

iD8DBQFEVt0/yeCLzp/JKjARAv8uAJsG08mk0Q8Ji1DMUyL/UuQgTOfkKgCgquW0
goWIfrQXqLU2XQ7THbZlgRQ=
=l1HX
-----END PGP SIGNATURE-----

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация