many notes to self

This commit is contained in:
Aidan Hahn 2019-11-12 13:25:53 -08:00
parent 123301881e
commit 6e57fe7e09
No known key found for this signature in database
GPG key ID: 327711E983899316

View file

@ -7,6 +7,17 @@ import (
type operation func(Token) Token
/*
* LIST: a list of elements
* OPERAND: an element which is
*/
type parse_tag enum {
LIST_T iota
OPERAND_T iota
OPERATOR_T iota
OPERATION_T iota
}
type Token struct {
Token *next
interface{} *_inner
@ -42,9 +53,13 @@ func lex(string input) string {
}
func parse(Token *arg) {
// if operand determine if operator
// determine operator precense in symbol table
// Determine if a list is an operation or a list
}
func eval(Token *tree) Token* {
// Find operations
// Simplify operations deepest first
// return tree of final Tokens
}