femtools.tokrules Namespace Reference

Functions

def p_error (p)
 
def p_expression_binop (p)
 
def p_expression_float (p)
 
def p_expression_group (p)
 
def p_expression_int (p)
 
def p_expression_name (p)
 
def p_expression_uminus (p)
 
def p_statement_assign (p)
 
def p_statement_expr (p)
 
def t_COMMENT (t)
 
def t_error (t)
 
def t_FLOAT (t)
 
def t_INT (t)
 
def t_newline (t)
 

Variables

 debug
 
 False
 
dictionary names = {}
 
tuple precedence
 
string t_DIVIDE = r'/'
 
string t_EQUALS = r'='
 
string t_ignore = " \t"
 
string t_LPAREN = r'\‍('
 
string t_MINUS = r'-'
 
string t_NAME = r'[a-zA-Z_][a-zA-Z0-9_]*'
 
string t_PLUS = r'\+'
 
string t_POWER = r'\^'
 
string t_RPAREN = r'\‍)'
 
string t_TIMES = r'\*'
 
tuple tokens
 
 write_tables
 

Function Documentation

◆ p_error()

def femtools.tokrules.p_error (   p)

◆ p_expression_binop()

def femtools.tokrules.p_expression_binop (   p)
expression : expression PLUS expression
              | expression MINUS expression
              | expression TIMES expression
              | expression DIVIDE expression
              | expression POWER expression

◆ p_expression_float()

def femtools.tokrules.p_expression_float (   p)

◆ p_expression_group()

def femtools.tokrules.p_expression_group (   p)

◆ p_expression_int()

def femtools.tokrules.p_expression_int (   p)

◆ p_expression_name()

def femtools.tokrules.p_expression_name (   p)

◆ p_expression_uminus()

def femtools.tokrules.p_expression_uminus (   p)

◆ p_statement_assign()

def femtools.tokrules.p_statement_assign (   p)

◆ p_statement_expr()

def femtools.tokrules.p_statement_expr (   p)

◆ t_COMMENT()

def femtools.tokrules.t_COMMENT (   t)

◆ t_error()

def femtools.tokrules.t_error (   t)

◆ t_FLOAT()

def femtools.tokrules.t_FLOAT (   t)

◆ t_INT()

def femtools.tokrules.t_INT (   t)

◆ t_newline()

def femtools.tokrules.t_newline (   t)

Variable Documentation

◆ debug

femtools.tokrules.debug

◆ False

femtools.tokrules.False

◆ names

dictionary femtools.tokrules.names = {}

◆ precedence

tuple femtools.tokrules.precedence
Initial value:
1= (
2 ('left', 'PLUS', 'MINUS'),
3 ('left', 'TIMES', 'DIVIDE'),
4 ('left', 'POWER'),
5 ('right', 'UMINUS')
6)

◆ t_DIVIDE

string femtools.tokrules.t_DIVIDE = r'/'

◆ t_EQUALS

string femtools.tokrules.t_EQUALS = r'='

◆ t_ignore

string femtools.tokrules.t_ignore = " \t"

◆ t_LPAREN

string femtools.tokrules.t_LPAREN = r'\‍('

◆ t_MINUS

string femtools.tokrules.t_MINUS = r'-'

◆ t_NAME

string femtools.tokrules.t_NAME = r'[a-zA-Z_][a-zA-Z0-9_]*'

◆ t_PLUS

string femtools.tokrules.t_PLUS = r'\+'

◆ t_POWER

string femtools.tokrules.t_POWER = r'\^'

◆ t_RPAREN

string femtools.tokrules.t_RPAREN = r'\‍)'

◆ t_TIMES

string femtools.tokrules.t_TIMES = r'\*'

◆ tokens

tuple femtools.tokrules.tokens
Initial value:
1= (
2 'NAME',
3 'FLOAT',
4 'INT',
5 'PLUS',
6 'MINUS',
7 'TIMES',
8 'DIVIDE',
9 'EQUALS',
10 'LPAREN',
11 'RPAREN',
12 'POWER'
13)

◆ write_tables

femtools.tokrules.write_tables