BenchGen
BenchGen is a tool for generating benchmarks to stress-test a computing system.
Loading...
Searching...
No Matches
lSystem.h File Reference
#include <iostream>
#include <list>
#include <unordered_map>
#include "../generator/generator.h"
#include "../shared/enums.h"
#include "../shared/globalStructs.h"
Include dependency graph for lSystem.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  lSystem
 The lSystem namespace contains functions to apply L-system rules to sequences of tokens, including matching rules and applying production rules.
 

Macros

#define PRODUCTION_TOK   TOK_ID
 

Functions

std::vector< TokenlSystem::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.
 

Macro Definition Documentation

◆ PRODUCTION_TOK

#define PRODUCTION_TOK   TOK_ID