# Path: AXUI/logger/logger.py
# LOGGER = logging.getLogger(logger_config.logger_name)


import ply.lex as lex
import ply.yacc as yacc
from AXUI.logger import LOGGER
    p[0]=("AND", p[1], p[3])
    
def p_identifier_or(p):
    'identifier : identifier OR identifier'
    p[0]=("OR", p[1], p[3])
    
def p_identifier_paren(p):
    'identifier : LPAREN identifier RPAREN'
    p[0]=p[2]
    
def p_identifier(p):
    'identifier : TERM EQUALS value'
    p[0]=(p[1], p[3])
    
def p_value_number(p):
    'value : NUMBER'
    p[0]=int(p[1])
    
def p_value_string(p):
    'value : STRING'
    p[0]=p[1].strip("\"").strip("\'")
    
def p_value_bool(p):
    'value : BOOL'
    if p[1].upper() == "TRUE":
        p[0]=True
    elif p[1].upper() == "FALSE":
        p[0]=False
    
def p_error(p):

# Path: AXUI/logger/logger.py
# LOGGER = logging.getLogger(logger_config.logger_name)


# Path: AXUI/parsing/identifier_parsing.py
import ply.lex as lex
import ply.yacc as yacc
from AXUI.logger import LOGGER

    p[0]=("AND", p[1], p[3])
    
def p_identifier_or(p):
    'identifier : identifier OR identifier'
    p[0]=("OR", p[1], p[3])
    
def p_identifier_paren(p):
    'identifier : LPAREN identifier RPAREN'
    p[0]=p[2]
    
def p_identifier(p):
    'identifier : TERM EQUALS value'
    p[0]=(p[1], p[3])
    
def p_value_number(p):
    'value : NUMBER'
    p[0]=int(p[1])
    
def p_value_string(p):
    'value : STRING'
    p[0]=p[1].strip("\"").strip("\'")
    
def p_value_bool(p):
    'value : BOOL'
    if p[1].upper() == "TRUE":
        p[0]=True
    elif p[1].upper() == "FALSE":
        p[0]=False
    
def p_error(p):

    LOGGER.debug("Syntax error in input: %s, Ln: %d" , repr(p.value), p.lineno)