Page MenuHomePhorge
Diviner Tech Docs PhutilCodeSnippetContextFreeGrammar

abstract class PhutilCodeSnippetContextFreeGrammar
Phorge Technical Documentation ()

Generates non-sense code snippets according to context-free rules, respecting indentation etc.

Also provides a common ruleset shared among many mainstream programming languages (that is, not Lisp).

Methods

public function __get($name)
Inherited

This method is not documented.
Parameters
$name
Return
wild

public function __set($name, $value)
Inherited

This method is not documented.
Parameters
$name
$value
Return
wild

public function current()
Inherited

This method is not documented.
Return
wild

public function key()
Inherited

This method is not documented.
Return
wild

public function next()
Inherited

This method is not documented.
Return
wild

public function rewind()
Inherited

This method is not documented.
Return
wild

public function valid()
Inherited

This method is not documented.
Return
wild

private function throwOnAttemptedIteration()
Inherited

This method is not documented.
Return
wild

public function getPhobjectClassConstant($key, $byte_limit)
Inherited

Phobject

Read the value of a class constant.

This is the same as just typing self::CONSTANTNAME, but throws a more useful message if the constant is not defined and allows the constant to be limited to a maximum length.

Parameters
string$keyName of the constant.
int|null$byte_limitMaximum number of bytes permitted in the value.
Return
stringValue of the constant.

final protected function getRules()

This method is not documented.
Return
wild

public function generateSeveral($count, $implode)
Inherited

This method is not documented.
Parameters
$count
$implode
Return
wild

public function generate()

This method is not documented.
Return
wild

final protected function applyRules($input, &$count, $rules)
Inherited

This method is not documented.
Parameters
$input
&$count
array$rules
Return
wild

private static function strPadLines($text, $num_spaces)
Inherited

This method is not documented.
Parameters
$text
$num_spaces
Return
wild

abstract protected function buildRuleSet()

This method is not documented.
Return
wild

protected function buildGrammarSet($name, $set)

This method is not documented.
Parameters
$name
array$set
Return
wild

protected function getStartGrammarSet()

This method is not documented.
Return
wild

protected function getStmtGrammarSet()

This method is not documented.
Return
wild

protected function getFuncNameGrammarSet()

This method is not documented.
Return
wild

protected function getVarNameGrammarSet()

This method is not documented.
Return
wild

protected function getNullExprGrammarSet()

This method is not documented.
Return
wild

protected function getNumberGrammarSet()

This method is not documented.
Return
wild

protected function getExprGrammarSet()

This method is not documented.
Return
wild

protected function getBoolExprGrammarSet()

This method is not documented.
Return
wild

protected function getBoolValGrammarSet()

This method is not documented.
Return
wild

protected function getArithExprGrammarSet()

This method is not documented.
Return
wild

protected function getAssignmentGrammarSet()

This method is not documented.
Return
wild

protected function getCondGrammarSet()

This method is not documented.
Return
wild

protected function getLoopGrammarSet()

This method is not documented.
Return
wild

protected function getTernaryExprGrammarSet()

This method is not documented.
Return
wild

protected function getStmtTerminationGrammarSet()

This method is not documented.
Return
wild