Change PHP grammar -


i wondering if there way change out grammar of php own.

for example:

  • print = show

  • class = box

  • function = item

i have read little antlr looks pretty complicated. wondering if there simple way, language file?

no, there's no simple way. php keywords hardcoded in interpreter , there no means change them. so, if don't them reason, options basically:

  • edit the lexer file , compile own php binary
  • use preprocessor convert keywords valid php on fly (like http://code.metala.org/p/ccpp/, looks rather dead me)
  • use "better-than-php" language, hack
  • learn other programming language
  • create own

or

  • just deal it. seriously, php fun if enjoy , don't try make "better" language out of it.

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -