Add the fluent commands specified on any columns.

@param  \Illuminate\Database\Schema\Grammars\Grammar  $grammar
@return void
166372
public function addFluentCommands(Grammar $grammar)
    {
        foreach ($this->columns as $column) {
            foreach ($grammar->getFluentCommands() as $commandName) {
                $attributeName = lcfirst($commandName);

                if (! isset($column->{$attributeName})) {
                    continue;
                }

                $value = $column->{$attributeName};

                $this->addCommand(
                    $commandName, compact('value', 'column')
                );
            }
        }
    }
404355
function collect_states( Grammar $Grammar ){
		$states = array();
		// start recursion
		$this->collect_states_recursive( $states, $Grammar, array(), ++self::$threadInc );
		return $states;
	}
882423
public function columns($column)
    {
        foreach (func_get_args() as $column) {
            $this->columns[] = $this->grammar->buildId($column);
        }

        return $this;
    }
85491
public function setOrder($column, $order = self::ORDER_ASC): void
    {
        $this->orders = [];
        $this->addOrder($column, $order);
    }
894908
def set_grammar_names():
    """"""
    for varname, val in vars(Grammar).items():
        if isinstance(val, ParserElement):
            setattr(Grammar, varname, val.setName(varname))
1199305
protected function registerMakeRuleCommand($command)
     {
         $this->app->singleton($command, function ($app) {
             return new Generators\Commands\RuleMakeCommand($app);
         });
     }
695268
protected function prepareStates(Grammar $grammar): void
    {
        /** @var TableRow[] $rows */
        $rows = [];
        /** @var ItemSet[] $states */
        $states = [];
        $item = Item::createFromRule($grammar->getMainRule());
        $item_set = ItemSet::createFromItems([$item], $grammar);
        /** @var ItemSet[][] $add_states_map */
        $add_states_map = [0 => ['' => $item_set]];
        while ($add_states_map) {
            $next_states_map = [];
            foreach ($add_states_map as $from_state_index => $to_states_list) {
                foreach ($to_states_list as $from_symbol_name => $new_state) {
                    $from_symbol_term = false;
                    $from_symbol_non_term = false;
                    if ('' !== $from_symbol_name) {
                        $from_symbol = $grammar->getSymbol($from_symbol_name);
                        if ($from_symbol->isTerminal()) {
                            $from_symbol_term = true;
                        } else {
                            $from_symbol_non_term = true;
                        }
                    }
                    foreach ($states as $i => $state) {
                        if ($new_state->isSame($state)) {
                            $row = $rows[$from_state_index];
                            if ($from_symbol_term) {
                                $row->terminalActions[$from_symbol_name] = $i;
                            } elseif ($from_symbol_non_term) {
                                $row->gotoSwitches[$from_symbol_name] = $i;
                            }
                            goto NEXT_NEW_STATE;
                        }
                    }

                    $state_index = count($states);
                    $states[] = $new_state;
                    $rows[] = new TableRow();

                    if ($new_state->hasFinalItem()) {
                        $rows[$state_index]->eofAction = true;
                    }

                    $next_states_map[$state_index] = $new_state->getNextSets($grammar);

                    $row = $rows[$from_state_index];
                    if ($from_symbol_term) {
                        $row->terminalActions[$from_symbol_name] = $state_index;
                    } elseif ($from_symbol_non_term) {
                        $row->gotoSwitches[$from_symbol_name] = $state_index;
                    }

                    NEXT_NEW_STATE:
                }
            }

            $add_states_map = $next_states_map;
        }

        foreach ($states as $index => $state) {
            $rule = $state->getReduceRule();
            if ($rule) {
                $rows[$index]->reduceRule = $rule;
            }
        }

        $this->rows = $rows;
        $this->states = $states;
    }
1372368
protected function writeCommands() {
        echo static::bold("COMMANDS").PHP_EOL;

        $table = new Table();
        foreach ($this->commandSchemas as $pattern => $schema) {
            if (static::isCommand($pattern)) {
                $table
                    ->row()
                    ->cell($pattern)
                    ->cell(Cli::val('description', Cli::val(Cli::META, $schema), ''));
            }
        }
        $table->write();
    }
1275974
protected function registerCommands()
    {
        if ($this->app->runningInConsole()) {
            $this->commands([
                ModulesCommand::class,
                ModelsCommand::class,
                EnumsCommand::class,
                RequestsCommand::class,
                MakeModuleCommand::class,
                VersionCommand::class
            ]);
        }
    }
1252764
public function build(ConnectionInterface $connection, IlluminateSchemaGrammar $grammar)
    {
        foreach ($this->toCypher($connection, $grammar) as $statement)
        {
            $connection->statement($statement);
        }
    }
898228
protected function registerCommands()
    {
        collect($this->commandList)->each(function ($commandClass, $key) {
            $this->registerCommand($key, $commandClass);
        });
    }
972075
public function register(Application $App) {
        $App->addCommand(new \YourApp\Command\Foo());
        $App->addCommand(new \YourApp\Command\Bar());
        $App->addCommand(new \YourApp\Command\Baz());
    }
272554
public function command($command)
    {
        if ($command instanceof CommandInterface) {
            $command->setContainer($this);
        }

        $this['console']->add($command);
    }
366606
public function build(Connection $connection, Grammar $grammar)
    {
        foreach ($this->toSql($connection, $grammar) as $statement) {
            $connection->statement($statement);
        }
    }
917643
static function make( array $grammar, $class = __CLASS__ ){
		$Me = new $class;
		foreach( $grammar as $nt => $rhss ){
			foreach( $rhss as $rhs ){
				$Me->make_rule( $nt, $rhs );
			}
		}
		return $Me;
	}
853110
function addInvisibles(grammar) {
		if (!grammar || grammar['tab']) {
			return;
		}

		// assign invisibles here to "mark" the grammar in case of self references
		for (var name in invisibles) {
			if (invisibles.hasOwnProperty(name)) {
				grammar[name] = invisibles[name];
			}
		}

		for (var name in grammar) {
			if (grammar.hasOwnProperty(name) && !invisibles[name]) {
				if (name === 'rest') {
					addInvisibles(grammar['rest']);
				} else {
					handleToken(grammar, name);
				}
			}
		}
	}
1247451
public function addLexerRule($rulename, $rule)
	{
		$this->rules[$rulename] = [];
		$this->rules[$rulename][] = $rule; 
	}