Create a new embedded language using PHP

Posted by dino beytar on Stack Overflow See other posts from Stack Overflow or by dino beytar
Published on 2010-12-31T09:18:53Z Indexed on 2010/12/31 9:54 UTC
Read the original article Hit count: 348

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:

  1. Verb and subject (ie. create page, update category)
  2. 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.

© Stack Overflow or respective owner

Related posts about php

Related posts about command-line