#include <iostream>
#include <list>
#include <unordered_map>
#include "../generator/generator.h"
#include "../shared/enums.h"
#include "../shared/globalStructs.h"
Go to the source code of this file.
|
namespace | lSystem |
| The lSystem namespace contains functions to apply L-system rules to sequences of tokens, including matching rules and applying production rules.
|
|
|
std::vector< Token > | lSystem::lSystem (int iterations, const std::vector< ProductionRule > &productionRules, const std::vector< Token > &inputTokens) |
| Applies L-system rules to generate a sequence of tokens.
|
|
int | lSystem::match (std::string match, const std::vector< ProductionRule > &rules) |
| Matches a string to a production rule.
|
|
int | lSystem::findEqualCall (const std::unordered_map< std::vector< Token >, int, TokenVectorHash, TokenVectorEqual > &callMap, const std::vector< Token > &callTokens) |
| Finds an existing call ID for a given set of tokens, if one exists.
|
|
void | lSystem::applyCallIds (std::list< Token > &outputTokens, int &callCounter) |
| Applies call IDs to sequences of tokens representing function calls.
|
|
void | lSystem::applyProductionRules (std::list< Token > &outputTokens, const std::vector< ProductionRule > &productionRules) |
| Applies production rules to the output tokens.
|
|
◆ PRODUCTION_TOK