# Path: symtable.py
# class SymbolTable(object):
# 	def __init__(self):
# 		self.symbols = {}
# 
# 	def add(self, name, value):
# 		logger.debug("%s store \"%s\"=\"%s\"", self, name, value)
# 
# 		# an attempt to store empty string is a bug
# 		assert len(name)
# 
# 		self.symbols[name] = value
# 
# 	def fetch(self, s):
# 		# now try a var lookup 
# 		# Will always return an empty string on any sort of failure. 
# 		logger.debug("fetch sym=\"%s\"", s)
# 		if not len(s):
# 			return ""
# 		try:
# 			return self.symbols[s]
# 		except KeyError:
# 			logger.debug("sym=%s not in symbol table", s)
# 			# try environment
# 			value = os.getenv(s)
# 			if value is None:
# 				return ""
# 			logger.debug("sym=%s found in environ", s)
# 			return value


import sys
import logging
import functions
from symtable import SymbolTable
from functions import *
from symbol import *
#!/usr/bin/env python3


logger = logging.getLogger("pymake")


def test_info():
	symbol_table = SymbolTable()
	info = Info([])
	info.eval(symbol_table)

	info = Info([Literal("hello, world")])
	info.eval(symbol_table)

	info = Info([VarRef([Literal("q")])])
	info.eval(symbol_table)

def test_find():

	test_list = ( "info hello, world",
				  "info  hello, world",
				  " info hello, world",
				  "info\thello, world",

# Path: symtable.py
# class SymbolTable(object):
# 	def __init__(self):
# 		self.symbols = {}
# 
# 	def add(self, name, value):
# 		logger.debug("%s store \"%s\"=\"%s\"", self, name, value)
# 
# 		# an attempt to store empty string is a bug
# 		assert len(name)
# 
# 		self.symbols[name] = value
# 
# 	def fetch(self, s):
# 		# now try a var lookup 
# 		# Will always return an empty string on any sort of failure. 
# 		logger.debug("fetch sym=\"%s\"", s)
# 		if not len(s):
# 			return ""
# 		try:
# 			return self.symbols[s]
# 		except KeyError:
# 			logger.debug("sym=%s not in symbol table", s)
# 			# try environment
# 			value = os.getenv(s)
# 			if value is None:
# 				return ""
# 			logger.debug("sym=%s found in environ", s)
# 			return value


# Path: test_functions.py
import sys
import logging
import functions
from symtable import SymbolTable
from functions import *
from symbol import *

#!/usr/bin/env python3


logger = logging.getLogger("pymake")


def test_info():
	symbol_table = SymbolTable()
	info = Info([])
	info.eval(symbol_table)

	info = Info([Literal("hello, world")])
	info.eval(symbol_table)

	info = Info([VarRef([Literal("q")])])
	info.eval(symbol_table)

def test_find():

	test_list = ( "info hello, world",
				  "info  hello, world",
				  " info hello, world",
				  "info\thello, world",

				  "info",