|
|
|
|
|
| Description |
| Functions for parsing L-System rules.
|
|
| Synopsis |
|
|
|
| Documentation |
|
| rule :: String -> Rule |
| A rule contains a left and right hand side separated by an '='
|
|
| axiom :: String -> Axiom |
| An axiom is just a list of commands.
|
|
| data Token |
| Basic lexemes.
| | Constructors | | TCommand String | | | TNum Float | | | TVar String | | | TEquals | |
| Instances | |
|
|
| tokenise :: String -> [Token] |
| Convert a string into a list of tokens.
|
|
| parseRule :: [Token] -> Rule |
| Parse a rule.
rule : commands '=' commands
|
|
| parseCommands :: [Token] -> ([Command], [Token]) |
|
| parseCommand :: [Token] -> (Command, [Token]) |
|
| parseCommand2 :: [Token] -> (Command, [Token]) |
|
| Produced by Haddock version 0.7 |