Skip to content

Instantly share code, notes, and snippets.

@Andrewsville
Created June 19, 2011 12:01
Show Gist options
  • Select an option

  • Save Andrewsville/1034192 to your computer and use it in GitHub Desktop.

Select an option

Save Andrewsville/1034192 to your computer and use it in GitHub Desktop.
Parser grammar defintion
[base]
class = "class_modifiers ? T_CLASS class_name T_EXTENDS class_name & ? T_IMPLEMENTS class_name T_TR_COMMA ? & + & ? class_body T_TR_SEMICOLON |"
[common]
class_modifiers = "T_FINAL T_ABSTRACT |"
class_name = "T_STRING T_NS_SEPARATOR T_STRING & *"
class_body = "T_TR_OPEN_CURLY T_TR_CLOSE_CURLY"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment