Page MenuHomeClusterLabs Projects
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

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