Create a new embedded language using PHP
- by dino beytar
I am trying to develop an administration panel and I have a command line. When a user send a command like below, i need to recognize it using PHP.
My aim is simplifying tasks in the admin panel.
create page -attr1 90 -attr2 'page title';
or
update category 90 -name 'Technology';
There are two main things:
Verb and subject (ie. create page, update category)
Attributes (can be both STRING and INT)
and more complex example:
create page -name EN:'Static Page' CA:'Staticna Stranica' -category 3,6,12,15;
Where can I start to create this very small embedded language, or how can I do it well really?
Clever answers, please.