<s> from __future__ import absolute_import <EOL> from __future__ import print_function <EOL> import sys <EOL> import os <EOL> from pyverilog . vparser . ply . yacc import yacc <EOL> from pyverilog . vparser . plyparser import PLYParser , Coord , ParseError <EOL> from pyverilog . vparser . preprocessor import VerilogPreprocessor <EOL> from pyverilog . vparser . lexer import VerilogLexer <EOL> from pyverilog . vparser . ast import * <EOL> class VerilogParser ( PLYParser ) : <EOL> '<STR_LIT>' <EOL> precedence = ( <EOL> ( '<STR_LIT:left>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT:left>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT:left>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT:left>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT:left>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT:left>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT:left>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT:left>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT:left>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT:left>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT:right>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ) <EOL> def __init__ ( self ) : <EOL> self . lexer = VerilogLexer ( error_func = self . _lexer_error_func ) <EOL> self . lexer . build ( ) <EOL> self . tokens = self . lexer . tokens <EOL> self . parser = yacc ( module = self , method = "<STR_LIT>" ) <EOL> def _lexer_error_func ( self , msg , line , column ) : <EOL> self . _parse_error ( msg , self . _coord ( line , column ) ) <EOL> def get_directives ( self ) : <EOL> return self . lexer . get_directives ( ) <EOL> def get_default_nettype ( self ) : <EOL> return self . lexer . get_default_nettype ( ) <EOL> def parse ( self , text , debug = <NUM_LIT:0> ) : <EOL> return self . parser . parse ( text , lexer = self . lexer , debug = debug ) <EOL> def p_source_text ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Source ( name = '<STR_LIT>' , description = p [ <NUM_LIT:1> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_description ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Description ( definitions = p [ <NUM_LIT:1> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_definitions ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:2> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_definitions_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_definition ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_definition_pragma ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_pragma_assign ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Pragma ( PragmaEntry ( p [ <NUM_LIT:3> ] , p [ <NUM_LIT:5> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_pragma ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Pragma ( PragmaEntry ( p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_moduledef ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ModuleDef ( name = p [ <NUM_LIT:2> ] , paramlist = p [ <NUM_LIT:3> ] , portlist = p [ <NUM_LIT:4> ] , items = p [ <NUM_LIT:5> ] , <EOL> default_nettype = self . get_default_nettype ( ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_modulename ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_modulename_or ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_paramlist ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Paramlist ( params = p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_paramlist_empty ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Paramlist ( params = ( ) ) <EOL> def p_params ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:2> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_params_begin ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:2> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_params_begin_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_params_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_param ( self , p ) : <EOL> '<STR_LIT>' <EOL> paramlist = [ Parameter ( rname , rvalue , lineno = p . lineno ( <NUM_LIT:2> ) ) for rname , rvalue in p [ <NUM_LIT:2> ] ] <EOL> p [ <NUM_LIT:0> ] = Decl ( tuple ( paramlist ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_param_width ( self , p ) : <EOL> '<STR_LIT>' <EOL> paramlist = [ Parameter ( rname , rvalue , p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:3> ) ) for rname , rvalue in p [ <NUM_LIT:3> ] ] <EOL> p [ <NUM_LIT:0> ] = Decl ( tuple ( paramlist ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_param_integer ( self , p ) : <EOL> '<STR_LIT>' <EOL> paramlist = [ Parameter ( rname , rvalue , lineno = p . lineno ( <NUM_LIT:3> ) ) for rname , rvalue in p [ <NUM_LIT:3> ] ] <EOL> p [ <NUM_LIT:0> ] = Decl ( tuple ( paramlist ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_param_end ( self , p ) : <EOL> '<STR_LIT>' <EOL> paramlist = [ Parameter ( rname , rvalue , lineno = p . lineno ( <NUM_LIT:2> ) ) for rname , rvalue in p [ <NUM_LIT:2> ] ] <EOL> p [ <NUM_LIT:0> ] = Decl ( tuple ( paramlist ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_param_end_width ( self , p ) : <EOL> '<STR_LIT>' <EOL> paramlist = [ Parameter ( rname , rvalue , p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:3> ) ) for rname , rvalue in p [ <NUM_LIT:3> ] ] <EOL> p [ <NUM_LIT:0> ] = Decl ( tuple ( paramlist ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_param_end_integer ( self , p ) : <EOL> '<STR_LIT>' <EOL> paramlist = [ Parameter ( rname , rvalue , lineno = p . lineno ( <NUM_LIT:3> ) ) for rname , rvalue in p [ <NUM_LIT:3> ] ] <EOL> p [ <NUM_LIT:0> ] = Decl ( tuple ( paramlist ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_portlist ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Portlist ( ports = p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_portlist_io ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Portlist ( ports = p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_portlist_paren_empty ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Portlist ( ports = ( ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_portlist_empty ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Portlist ( ports = ( ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_ports ( self , p ) : <EOL> '<STR_LIT>' <EOL> wid = None <EOL> port = Port ( name = p [ <NUM_LIT:3> ] , width = wid , type = None , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( port , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_ports_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> wid = None <EOL> port = Port ( name = p [ <NUM_LIT:1> ] , width = wid , type = None , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p [ <NUM_LIT:0> ] = ( port , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_portname ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_sigtypes ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:2> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_sigtypes_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_sigtype_input ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_sigtype_output ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_sigtype_inout ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_sigtype_tri ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_sigtype_reg ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_sigtype_wire ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_sigtype_signed ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_sigtype_supply0 ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_sigtype_supply1 ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_ioports ( self , p ) : <EOL> '<STR_LIT>' <EOL> if isinstance ( p [ <NUM_LIT:3> ] , str ) : <EOL> t = None <EOL> for r in reversed ( p [ <NUM_LIT:1> ] ) : <EOL> if isinstance ( r . first , Input ) : <EOL> t = Ioport ( Input ( name = p [ <NUM_LIT:3> ] , width = r . first . width , lineno = p . lineno ( <NUM_LIT:3> ) ) , <EOL> lineno = p . lineno ( <NUM_LIT:3> ) ) <EOL> break <EOL> if isinstance ( r . first , Output ) and r . second is None : <EOL> t = Ioport ( Output ( name = p [ <NUM_LIT:3> ] , width = r . first . width , lineno = p . lineno ( <NUM_LIT:3> ) ) , <EOL> lineno = p . lineno ( <NUM_LIT:3> ) ) <EOL> break <EOL> if isinstance ( r . first , Output ) and isinstance ( r . second , Reg ) : <EOL> t = Ioport ( Output ( name = p [ <NUM_LIT:3> ] , width = r . first . width , lineno = p . lineno ( <NUM_LIT:3> ) ) , <EOL> Reg ( name = p [ <NUM_LIT:3> ] , width = r . first . width , lineno = p . lineno ( <NUM_LIT:3> ) ) , <EOL> lineno = p . lineno ( <NUM_LIT:3> ) ) <EOL> break <EOL> if isinstance ( r . first , Inout ) : <EOL> t = Ioport ( Inout ( name = p [ <NUM_LIT:3> ] , width = r . first . width , lineno = p . lineno ( <NUM_LIT:3> ) ) , <EOL> lineno = p . lineno ( <NUM_LIT:3> ) ) <EOL> break <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( t , ) <EOL> else : <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:3> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_ioports_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def create_ioport ( self , sigtypes , name , width = None , lineno = <NUM_LIT:0> ) : <EOL> self . typecheck_ioport ( sigtypes ) <EOL> first = None <EOL> second = None <EOL> signed = False <EOL> if '<STR_LIT>' in sigtypes : <EOL> signed = True <EOL> if '<STR_LIT:input>' in sigtypes : <EOL> first = Input ( name = name , width = width , signed = signed , lineno = lineno ) <EOL> if '<STR_LIT>' in sigtypes : <EOL> first = Output ( name = name , width = width , signed = signed , lineno = lineno ) <EOL> if '<STR_LIT>' in sigtypes : <EOL> first = Inout ( name = name , width = width , signed = signed , lineno = lineno ) <EOL> if '<STR_LIT>' in sigtypes : <EOL> second = Wire ( name = name , width = width , signed = signed , lineno = lineno ) <EOL> if '<STR_LIT>' in sigtypes : <EOL> second = Reg ( name = name , width = width , signed = signed , lineno = lineno ) <EOL> if '<STR_LIT>' in sigtypes : <EOL> second = Tri ( name = name , width = width , signed = signed , lineno = lineno ) <EOL> return Ioport ( first , second , lineno = lineno ) <EOL> def typecheck_ioport ( self , sigtypes ) : <EOL> if '<STR_LIT:input>' not in sigtypes and '<STR_LIT>' not in sigtypes and '<STR_LIT>' not in sigtypes : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> if '<STR_LIT:input>' in sigtypes and '<STR_LIT>' in sigtypes : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> if '<STR_LIT>' in sigtypes and '<STR_LIT>' in sigtypes : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> if '<STR_LIT>' in sigtypes and '<STR_LIT:input>' in sigtypes : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> if '<STR_LIT:input>' in sigtypes and '<STR_LIT>' in sigtypes : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> if '<STR_LIT>' in sigtypes and '<STR_LIT>' in sigtypes : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> if '<STR_LIT:input>' in sigtypes and '<STR_LIT>' in sigtypes : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> if '<STR_LIT>' in sigtypes and '<STR_LIT>' in sigtypes : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> def p_ioport ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = self . create_ioport ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:2> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_ioport_width ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = self . create_ioport ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , width = p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:3> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_ioport_head ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = self . create_ioport ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:2> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_ioport_head_width ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = self . create_ioport ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , width = p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:3> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_ioport_portname ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_width ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Width ( p [ <NUM_LIT:2> ] , p [ <NUM_LIT:4> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_length ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Length ( p [ <NUM_LIT:2> ] , p [ <NUM_LIT:4> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_items ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:2> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_items_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_items_empty ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( ) <EOL> def p_item ( self , p ) : <EOL> """<STR_LIT>""" <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_standard_item ( self , p ) : <EOL> """<STR_LIT>""" <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def create_decl ( self , sigtypes , name , width = None , length = None , lineno = <NUM_LIT:0> ) : <EOL> self . typecheck_decl ( sigtypes , length ) <EOL> decls = [ ] <EOL> signed = False <EOL> if '<STR_LIT>' in sigtypes : <EOL> signed = True <EOL> if '<STR_LIT:input>' in sigtypes : <EOL> decls . append ( Input ( name = name , width = width , signed = signed , lineno = lineno ) ) <EOL> if '<STR_LIT>' in sigtypes : <EOL> decls . append ( Output ( name = name , width = width , signed = signed , lineno = lineno ) ) <EOL> if '<STR_LIT>' in sigtypes : <EOL> decls . append ( Inout ( name = name , width = width , signed = signed , lineno = lineno ) ) <EOL> if '<STR_LIT>' in sigtypes : <EOL> if length : <EOL> decls . append ( WireArray ( name = name , width = width , <EOL> signed = signed , length = length , lineno = lineno ) ) <EOL> else : <EOL> decls . append ( Wire ( name = name , width = width , signed = signed , lineno = lineno ) ) <EOL> if '<STR_LIT>' in sigtypes : <EOL> if length : <EOL> decls . append ( RegArray ( name = name , width = width , <EOL> signed = signed , length = length , lineno = lineno ) ) <EOL> else : <EOL> decls . append ( Reg ( name = name , width = width , signed = signed , lineno = lineno ) ) <EOL> if '<STR_LIT>' in sigtypes : <EOL> decls . append ( Tri ( name = name , width = width , signed = signed , lineno = lineno ) ) <EOL> if '<STR_LIT>' in sigtypes : <EOL> decls . append ( Supply ( name = name , value = IntConst ( '<STR_LIT:0>' , lineno = lineno ) , <EOL> width = width , signed = signed , lineno = lineno ) ) <EOL> if '<STR_LIT>' in sigtypes : <EOL> decls . append ( Supply ( name = name , value = IntConst ( '<STR_LIT:1>' , lineno = lineno ) , <EOL> width = width , signed = signed , lineno = lineno ) ) <EOL> return decls <EOL> def typecheck_decl ( self , sigtypes , length = None ) : <EOL> if length and '<STR_LIT:input>' in sigtypes : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> if length and '<STR_LIT>' in sigtypes : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> if length and '<STR_LIT>' in sigtypes : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> if len ( sigtypes ) == <NUM_LIT:1> and '<STR_LIT>' in sigtypes : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> if '<STR_LIT:input>' in sigtypes and '<STR_LIT>' in sigtypes : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> if '<STR_LIT>' in sigtypes and '<STR_LIT>' in sigtypes : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> if '<STR_LIT>' in sigtypes and '<STR_LIT:input>' in sigtypes : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> if '<STR_LIT:input>' in sigtypes and '<STR_LIT>' in sigtypes : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> if '<STR_LIT>' in sigtypes and '<STR_LIT>' in sigtypes : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> if '<STR_LIT:input>' in sigtypes and '<STR_LIT>' in sigtypes : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> if '<STR_LIT>' in sigtypes and '<STR_LIT>' in sigtypes : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> def p_decl ( self , p ) : <EOL> '<STR_LIT>' <EOL> decllist = [ ] <EOL> for rname , rlength in p [ <NUM_LIT:2> ] : <EOL> decllist . extend ( self . create_decl ( p [ <NUM_LIT:1> ] , rname , length = rlength , <EOL> lineno = p . lineno ( <NUM_LIT:2> ) ) ) <EOL> p [ <NUM_LIT:0> ] = Decl ( tuple ( decllist ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_decl_width ( self , p ) : <EOL> '<STR_LIT>' <EOL> decllist = [ ] <EOL> for rname , rlength in p [ <NUM_LIT:3> ] : <EOL> decllist . extend ( self . create_decl ( p [ <NUM_LIT:1> ] , rname , width = p [ <NUM_LIT:2> ] , length = rlength , <EOL> lineno = p . lineno ( <NUM_LIT:3> ) ) ) <EOL> p [ <NUM_LIT:0> ] = Decl ( tuple ( decllist ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_declnamelist ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:3> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_declnamelist_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_declname ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , None ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_declarray ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:2> ] ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def create_declassign ( self , sigtypes , name , assign , width = None , lineno = <NUM_LIT:0> ) : <EOL> self . typecheck_declassign ( sigtypes ) <EOL> decls = [ ] <EOL> signed = False <EOL> if '<STR_LIT>' in sigtypes : <EOL> signed = True <EOL> if '<STR_LIT:input>' in sigtypes : <EOL> decls . append ( Input ( name = name , width = width , signed = signed , lineno = lineno ) ) <EOL> if '<STR_LIT>' in sigtypes : <EOL> decls . append ( Output ( name = name , width = width , signed = signed , lineno = lineno ) ) <EOL> if '<STR_LIT>' in sigtypes : <EOL> decls . append ( Inout ( name = name , width = width , signed = signed , lineno = lineno ) ) <EOL> if '<STR_LIT>' in sigtypes : <EOL> decls . append ( Wire ( name = name , width = width , signed = signed , lineno = lineno ) ) <EOL> if '<STR_LIT>' in sigtypes : <EOL> decls . append ( Reg ( name = name , width = width , signed = signed , lineno = lineno ) ) <EOL> decls . append ( assign ) <EOL> return decls <EOL> def typecheck_declassign ( self , sigtypes ) : <EOL> if len ( sigtypes ) == <NUM_LIT:1> and '<STR_LIT>' in sigtypes : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> if '<STR_LIT>' not in sigtypes and '<STR_LIT>' not in sigtypes : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> if '<STR_LIT:input>' in sigtypes and '<STR_LIT>' in sigtypes : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> if '<STR_LIT>' in sigtypes and '<STR_LIT>' in sigtypes : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> if '<STR_LIT>' in sigtypes and '<STR_LIT:input>' in sigtypes : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> if '<STR_LIT:input>' in sigtypes and '<STR_LIT>' in sigtypes : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> if '<STR_LIT>' in sigtypes and '<STR_LIT>' in sigtypes : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> if '<STR_LIT>' in sigtypes and len ( sigtypes ) != <NUM_LIT:1> : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> if '<STR_LIT>' in sigtypes and len ( sigtypes ) != <NUM_LIT:1> : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> def p_declassign ( self , p ) : <EOL> '<STR_LIT>' <EOL> decllist = self . create_declassign ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:2> ] [ <NUM_LIT:0> ] , p [ <NUM_LIT:2> ] [ <NUM_LIT:1> ] , lineno = p . lineno ( <NUM_LIT:2> ) ) <EOL> p [ <NUM_LIT:0> ] = Decl ( decllist , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_declassign_width ( self , p ) : <EOL> '<STR_LIT>' <EOL> decllist = self . create_declassign ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] [ <NUM_LIT:0> ] , p [ <NUM_LIT:3> ] [ <NUM_LIT:1> ] , width = p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:3> ) ) <EOL> p [ <NUM_LIT:0> ] = Decl ( tuple ( decllist ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_declassign_element ( self , p ) : <EOL> '<STR_LIT>' <EOL> assign = Assign ( Lvalue ( Identifier ( p [ <NUM_LIT:1> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) , lineno = p . lineno ( <NUM_LIT:1> ) ) , <EOL> p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , assign ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_declassign_element_delay ( self , p ) : <EOL> '<STR_LIT>' <EOL> assign = Assign ( Lvalue ( Identifier ( p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) , lineno = p . lineno ( <NUM_LIT:2> ) ) , <EOL> p [ <NUM_LIT:5> ] , p [ <NUM_LIT:1> ] , p [ <NUM_LIT:4> ] , lineno = p . lineno ( <NUM_LIT:2> ) ) <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , assign ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:2> ) ) <EOL> def p_integerdecl ( self , p ) : <EOL> '<STR_LIT>' <EOL> intlist = [ Integer ( r , <EOL> Width ( msb = IntConst ( '<STR_LIT>' , lineno = p . lineno ( <NUM_LIT:2> ) ) , <EOL> lsb = IntConst ( '<STR_LIT:0>' , lineno = p . lineno ( <NUM_LIT:2> ) ) , <EOL> lineno = p . lineno ( <NUM_LIT:2> ) ) , <EOL> signed = True , lineno = p . lineno ( <NUM_LIT:2> ) ) for r in p [ <NUM_LIT:2> ] ] <EOL> p [ <NUM_LIT:0> ] = Decl ( tuple ( intlist ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_integerdecl_signed ( self , p ) : <EOL> '<STR_LIT>' <EOL> intlist = [ Integer ( r , <EOL> Width ( msb = IntConst ( '<STR_LIT>' , lineno = p . lineno ( <NUM_LIT:3> ) ) , <EOL> lsb = IntConst ( '<STR_LIT:0>' , lineno = p . lineno ( <NUM_LIT:3> ) ) , <EOL> lineno = p . lineno ( <NUM_LIT:3> ) ) , <EOL> signed = True , lineno = p . lineno ( <NUM_LIT:3> ) ) for r in p [ <NUM_LIT:2> ] ] <EOL> p [ <NUM_LIT:0> ] = Decl ( tuple ( intlist ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_integernamelist ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:3> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_integernamelist_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_integername ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_realdecl ( self , p ) : <EOL> '<STR_LIT>' <EOL> reallist = [ Real ( p [ <NUM_LIT:1> ] , <EOL> Width ( msb = IntConst ( '<STR_LIT>' , lineno = p . lineno ( <NUM_LIT:2> ) ) , <EOL> lsb = IntConst ( '<STR_LIT:0>' , lineno = p . lineno ( <NUM_LIT:2> ) ) , <EOL> lineno = p . lineno ( <NUM_LIT:2> ) ) , <EOL> lineno = p . lineno ( <NUM_LIT:2> ) ) for r in p [ <NUM_LIT:2> ] ] <EOL> p [ <NUM_LIT:0> ] = Decl ( tuple ( reallist ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_realnamelist ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:3> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_realnamelist_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_realname ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_parameterdecl ( self , p ) : <EOL> '<STR_LIT>' <EOL> paramlist = [ Parameter ( rname , rvalue , lineno = p . lineno ( <NUM_LIT:2> ) ) for rname , rvalue in p [ <NUM_LIT:2> ] ] <EOL> p [ <NUM_LIT:0> ] = Decl ( tuple ( paramlist ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_parameterdecl_width ( self , p ) : <EOL> '<STR_LIT>' <EOL> paramlist = [ Parameter ( rname , rvalue , p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:3> ) ) for rname , rvalue in p [ <NUM_LIT:3> ] ] <EOL> p [ <NUM_LIT:0> ] = Decl ( tuple ( paramlist ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_parameterdecl_integer ( self , p ) : <EOL> '<STR_LIT>' <EOL> paramlist = [ Parameter ( rname , rvalue , lineno = p . lineno ( <NUM_LIT:3> ) ) for rname , rvalue in p [ <NUM_LIT:3> ] ] <EOL> p [ <NUM_LIT:0> ] = Decl ( tuple ( paramlist ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_localparamdecl ( self , p ) : <EOL> '<STR_LIT>' <EOL> paramlist = [ Localparam ( rname , rvalue , lineno = p . lineno ( <NUM_LIT:2> ) ) for rname , rvalue in p [ <NUM_LIT:2> ] ] <EOL> p [ <NUM_LIT:0> ] = Decl ( tuple ( paramlist ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_localparamdecl_width ( self , p ) : <EOL> '<STR_LIT>' <EOL> paramlist = [ Localparam ( rname , rvalue , p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:3> ) ) for rname , rvalue in p [ <NUM_LIT:3> ] ] <EOL> p [ <NUM_LIT:0> ] = Decl ( tuple ( paramlist ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_localparamdecl_integer ( self , p ) : <EOL> '<STR_LIT>' <EOL> paramlist = [ Localparam ( rname , rvalue , lineno = p . lineno ( <NUM_LIT:3> ) ) for rname , rvalue in p [ <NUM_LIT:3> ] ] <EOL> p [ <NUM_LIT:0> ] = Decl ( tuple ( paramlist ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_param_substitution_list ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:3> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_param_substitution_list_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_param_substitution ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_assignment ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Assign ( p [ <NUM_LIT:2> ] , p [ <NUM_LIT:4> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_assignment_delay ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Assign ( p [ <NUM_LIT:3> ] , p [ <NUM_LIT:6> ] , p [ <NUM_LIT:2> ] , p [ <NUM_LIT:5> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_lpartselect_lpointer ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Partselect ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , p [ <NUM_LIT:5> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_lpartselect_lpointer_plus ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Partselect ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , Plus ( p [ <NUM_LIT:3> ] , p [ <NUM_LIT:5> ] ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_lpartselect_lpointer_minus ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Partselect ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , Minus ( p [ <NUM_LIT:3> ] , p [ <NUM_LIT:5> ] ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_lpartselect ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Partselect ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , p [ <NUM_LIT:5> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_lpartselect_plus ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Partselect ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , Plus ( p [ <NUM_LIT:3> ] , p [ <NUM_LIT:5> ] ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_lpartselect_minus ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Partselect ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , Minus ( p [ <NUM_LIT:3> ] , p [ <NUM_LIT:5> ] ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_lpointer ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_lconcat ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = LConcat ( p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_lconcatlist ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:3> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_lconcatlist_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_lconcat_one_identifier ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_lconcat_one_lpartselect ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_lconcat_one_lpointer ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_lconcat_one_lconcat ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_lvalue_partselect ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Lvalue ( p [ <NUM_LIT:1> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_lvalue_pointer ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Lvalue ( p [ <NUM_LIT:1> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_lvalue_concat ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Lvalue ( p [ <NUM_LIT:1> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_lvalue_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Lvalue ( p [ <NUM_LIT:1> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_rvalue ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Rvalue ( p [ <NUM_LIT:1> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_uminus ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Uminus ( p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_uplus ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:2> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_ulnot ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Ulnot ( p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_unot ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Unot ( p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_uand ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Uand ( p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_unand ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Unand ( p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_unor ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Unor ( p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_uor ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Uor ( p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_uxor ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Uxor ( p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_uxnor ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Uxnor ( p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_power ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Power ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_times ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Times ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_div ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Divide ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_mod ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Mod ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_plus ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Plus ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_minus ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Minus ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_sll ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Sll ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_srl ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Srl ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_sla ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Sll ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_sra ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Sra ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_lessthan ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = LessThan ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_greaterthan ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = GreaterThan ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_lesseq ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = LessEq ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_greatereq ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = GreaterEq ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_eq ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Eq ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_noteq ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = NotEq ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_eql ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Eql ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_noteql ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = NotEql ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_And ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = And ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_Xor ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Xor ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_Xnor ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Xnor ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_Or ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Or ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_land ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Land ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_lor ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Lor ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_cond ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Cond ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , p [ <NUM_LIT:5> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_expr ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:2> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:2> ) ) <EOL> def p_expression_concat ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_repeat ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_partselect ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_pointer ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_functioncall ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_systemcall ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_id ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_expression_const ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_concat ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Concat ( p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_concatlist ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:3> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_concatlist_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_repeat ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Repeat ( p [ <NUM_LIT:3> ] , p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_partselect ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Partselect ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , p [ <NUM_LIT:5> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_partselect_plus ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Partselect ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , Plus ( p [ <NUM_LIT:3> ] , p [ <NUM_LIT:5> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_partselect_minus ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Partselect ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , Minus ( p [ <NUM_LIT:3> ] , p [ <NUM_LIT:5> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_partselect_pointer ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Partselect ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , p [ <NUM_LIT:5> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_partselect_pointer_plus ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Partselect ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , Plus ( p [ <NUM_LIT:3> ] , p [ <NUM_LIT:5> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_partselect_pointer_minus ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Partselect ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , Minus ( p [ <NUM_LIT:3> ] , p [ <NUM_LIT:5> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_pointer ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Pointer ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_pointer_pointer ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Pointer ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_const_expression_intnum ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = IntConst ( p [ <NUM_LIT:1> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_const_expression_floatnum ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = FloatConst ( p [ <NUM_LIT:1> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_const_expression_stringliteral ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = StringConst ( p [ <NUM_LIT:1> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_floatnumber ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_intnumber ( self , p ) : <EOL> """<STR_LIT>""" <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_stringliteral ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] [ <NUM_LIT:1> : - <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_always ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Always ( p [ <NUM_LIT:2> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_sens_egde_paren ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = SensList ( p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_posedgesig ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Sens ( p [ <NUM_LIT:2> ] , '<STR_LIT>' , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_negedgesig ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Sens ( p [ <NUM_LIT:2> ] , '<STR_LIT>' , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_edgesig_base_identifier ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_edgesig_base_pointer ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_edgesigs ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:3> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_edgesigs_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_sens_empty ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = SensList ( ( Sens ( None , '<STR_LIT:all>' , lineno = p . lineno ( <NUM_LIT:1> ) ) , ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_sens_level ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = SensList ( ( p [ <NUM_LIT:2> ] , ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_sens_level_paren ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = SensList ( p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_levelsig ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Sens ( p [ <NUM_LIT:1> ] , '<STR_LIT>' , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_levelsig_base_identifier ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_levelsig_base_pointer ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_levelsig_base_partselect ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_levelsigs ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:3> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_levelsigs_comma ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:3> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_levelsigs_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_sens_all ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = SensList ( ( Sens ( None , '<STR_LIT:all>' , lineno = p . lineno ( <NUM_LIT:1> ) ) , ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_sens_all_paren ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = SensList ( ( Sens ( None , '<STR_LIT:all>' , lineno = p . lineno ( <NUM_LIT:1> ) ) , ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_basic_statement ( self , p ) : <EOL> """<STR_LIT>""" <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_always_statement ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_blocking_substitution ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = BlockingSubstitution ( p [ <NUM_LIT:2> ] , p [ <NUM_LIT:5> ] , p [ <NUM_LIT:1> ] , p [ <NUM_LIT:4> ] , lineno = p . lineno ( <NUM_LIT:2> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:2> ) ) <EOL> def p_blocking_substitution_base ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = BlockingSubstitution ( p [ <NUM_LIT:2> ] , p [ <NUM_LIT:5> ] , p [ <NUM_LIT:1> ] , p [ <NUM_LIT:4> ] , lineno = p . lineno ( <NUM_LIT:2> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:2> ) ) <EOL> def p_nonblocking_substitution ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = NonblockingSubstitution ( p [ <NUM_LIT:2> ] , p [ <NUM_LIT:5> ] , p [ <NUM_LIT:1> ] , p [ <NUM_LIT:4> ] , lineno = p . lineno ( <NUM_LIT:2> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:2> ) ) <EOL> def p_delays ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = DelayStatement ( p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_delays_identifier ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = DelayStatement ( p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_delays_intnumber ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = DelayStatement ( IntConst ( p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_delays_floatnumber ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = DelayStatement ( FloatConst ( p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_delays_empty ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = None <EOL> def p_block ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Block ( p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_block_empty ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Block ( ( ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_block_statements ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:2> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_block_statements_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_block_statement ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_namedblock ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Block ( p [ <NUM_LIT:4> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_namedblock_empty ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Block ( ( ) , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_namedblock_statements ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:2> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_namedblock_statements_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_namedblock_statement ( self , p ) : <EOL> """<STR_LIT>""" <EOL> if isinstance ( p [ <NUM_LIT:1> ] , Decl ) : <EOL> for r in p [ <NUM_LIT:1> ] . list : <EOL> if ( not isinstance ( r , Reg ) and not isinstance ( r , Wire ) and <EOL> not isinstance ( r , Integer ) and not isinstance ( r , Real ) and <EOL> not isinstance ( r , Parameter ) and not isinstance ( r , Localparam ) ) : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_parallelblock ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ParallelBlock ( p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_parallelblock_empty ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ParallelBlock ( ( ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_if_statement ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = IfStatement ( p [ <NUM_LIT:3> ] , p [ <NUM_LIT:5> ] , p [ <NUM_LIT:7> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_if_statement_woelse ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = IfStatement ( p [ <NUM_LIT:3> ] , p [ <NUM_LIT:5> ] , None , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_if_statement_delay ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = IfStatement ( p [ <NUM_LIT:4> ] , p [ <NUM_LIT:6> ] , p [ <NUM_LIT:8> ] , lineno = p . lineno ( <NUM_LIT:2> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:2> ) ) <EOL> def p_if_statement_woelse_delay ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = IfStatement ( p [ <NUM_LIT:4> ] , p [ <NUM_LIT:6> ] , None , lineno = p . lineno ( <NUM_LIT:2> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:2> ) ) <EOL> def p_cond ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_ifcontent_statement ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_true_statement ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_else_statement ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_for_statement ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ForStatement ( p [ <NUM_LIT:3> ] , p [ <NUM_LIT:4> ] , p [ <NUM_LIT:5> ] , p [ <NUM_LIT:7> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_forpre ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_forpre_empty ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = None <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_forcond ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_forcond_empty ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = None <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_forpost ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_forpost_empty ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = None <EOL> def p_forcontent_statement ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_while_statement ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = WhileStatement ( p [ <NUM_LIT:3> ] , p [ <NUM_LIT:5> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_whilecontent_statement ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_case_statement ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = CaseStatement ( p [ <NUM_LIT:3> ] , p [ <NUM_LIT:5> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_casex_statement ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = CasexStatement ( p [ <NUM_LIT:3> ] , p [ <NUM_LIT:5> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_case_comp ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_casecontent_statements ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:2> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_casecontent_statements_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_casecontent_statement ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Case ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_casecontent_condition_single ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:3> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_casecontent_condition_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_casecontent_statement_default ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Case ( None , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_initial ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Initial ( p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_initial_statement ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_event_statement ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = EventStatement ( p [ <NUM_LIT:1> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_wait_statement ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = WaitStatement ( p [ <NUM_LIT:3> ] , p [ <NUM_LIT:5> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_waitcontent_statement ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_waitcontent_statement_empty ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = None <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_forever_statement ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ForeverStatement ( p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_instance ( self , p ) : <EOL> '<STR_LIT>' <EOL> instancelist = [ ] <EOL> for instance_name , instance_ports , instance_array in p [ <NUM_LIT:3> ] : <EOL> instancelist . append ( Instance ( p [ <NUM_LIT:1> ] , instance_name , instance_ports , <EOL> p [ <NUM_LIT:2> ] , instance_array , lineno = p . lineno ( <NUM_LIT:1> ) ) ) <EOL> p [ <NUM_LIT:0> ] = InstanceList ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:2> ] , tuple ( instancelist ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_instance_or ( self , p ) : <EOL> '<STR_LIT>' <EOL> instancelist = [ ] <EOL> for instance_name , instance_ports , instance_array in p [ <NUM_LIT:3> ] : <EOL> instancelist . append ( Instance ( p [ <NUM_LIT:1> ] , instance_name , instance_ports , <EOL> p [ <NUM_LIT:2> ] , instance_array , lineno = p . lineno ( <NUM_LIT:1> ) ) ) <EOL> p [ <NUM_LIT:0> ] = InstanceList ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:2> ] , tuple ( instancelist ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_instance_bodylist ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:3> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_instance_bodylist_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_instance_body ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , None ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_instance_body_array ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:4> ] , p [ <NUM_LIT:2> ] ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_instance_noname ( self , p ) : <EOL> '<STR_LIT>' <EOL> instancelist = [ ] <EOL> for instance_name , instance_ports , instance_array in p [ <NUM_LIT:2> ] : <EOL> instancelist . append ( Instance ( p [ <NUM_LIT:1> ] , instance_name , instance_ports , <EOL> ( ) , instance_array , lineno = p . lineno ( <NUM_LIT:1> ) ) ) <EOL> p [ <NUM_LIT:0> ] = InstanceList ( p [ <NUM_LIT:1> ] , ( ) , tuple ( instancelist ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_instance_or_noname ( self , p ) : <EOL> '<STR_LIT>' <EOL> instancelist = [ ] <EOL> for instance_name , instance_ports , instance_array in p [ <NUM_LIT:2> ] : <EOL> instancelist . append ( Instance ( p [ <NUM_LIT:1> ] , instance_name , instance_ports , <EOL> ( ) , instance_array , lineno = p . lineno ( <NUM_LIT:1> ) ) ) <EOL> p [ <NUM_LIT:0> ] = InstanceList ( p [ <NUM_LIT:1> ] , ( ) , tuple ( instancelist ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_instance_bodylist_noname ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:3> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_instance_bodylist_one_noname ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_instance_body_noname ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( '<STR_LIT>' , p [ <NUM_LIT:2> ] , None ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_parameterlist ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:3> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_parameterlist_noname ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:3> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_parameterlist_empty ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( ) <EOL> def p_param_args_noname ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:3> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_param_args_noname_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_param_args ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:3> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_param_args_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_param_arg_noname_exp ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ParamArg ( None , p [ <NUM_LIT:1> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_param_arg_exp ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ParamArg ( p [ <NUM_LIT:2> ] , p [ <NUM_LIT:4> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_instance_ports ( self , p ) : <EOL> """<STR_LIT>""" <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_instance_ports_list ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:3> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_instance_ports_list_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_instance_port_list ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = PortArg ( None , p [ <NUM_LIT:1> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_instance_ports_arg ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:3> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_instance_ports_arg_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_instance_port_arg ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = PortArg ( p [ <NUM_LIT:2> ] , p [ <NUM_LIT:4> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_instance_port_arg_exp ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = PortArg ( p [ <NUM_LIT:2> ] , p [ <NUM_LIT:4> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_instance_port_arg_none ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = PortArg ( p [ <NUM_LIT:2> ] , None , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_genvardecl ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Decl ( p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_genvarlist ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:3> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_genvarlist_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_genvar ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Genvar ( name = p [ <NUM_LIT:1> ] , <EOL> width = Width ( msb = IntConst ( '<STR_LIT>' , lineno = p . lineno ( <NUM_LIT:1> ) ) , <EOL> lsb = IntConst ( '<STR_LIT:0>' , lineno = p . lineno ( <NUM_LIT:1> ) ) , <EOL> lineno = p . lineno ( <NUM_LIT:1> ) ) , <EOL> lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_generate ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = GenerateStatement ( p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_generate_items_empty ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_generate_items ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:2> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_generate_items_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_generate_item ( self , p ) : <EOL> """<STR_LIT>""" <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_generate_block ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Block ( p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_generate_named_block ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Block ( p [ <NUM_LIT:4> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_generate_if ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = IfStatement ( p [ <NUM_LIT:3> ] , p [ <NUM_LIT:5> ] , p [ <NUM_LIT:7> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_generate_if_woelse ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = IfStatement ( p [ <NUM_LIT:3> ] , p [ <NUM_LIT:5> ] , None , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_generate_if_true_item ( self , p ) : <EOL> """<STR_LIT>""" <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_generate_if_false_item ( self , p ) : <EOL> """<STR_LIT>""" <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_generate_for ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ForStatement ( p [ <NUM_LIT:3> ] , p [ <NUM_LIT:4> ] , p [ <NUM_LIT:5> ] , p [ <NUM_LIT:7> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_generate_forcontent ( self , p ) : <EOL> """<STR_LIT>""" <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_systemcall_noargs ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = SystemCall ( p [ <NUM_LIT:2> ] , ( ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_systemcall ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = SystemCall ( p [ <NUM_LIT:2> ] , p [ <NUM_LIT:4> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_systemcall_signed ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = SystemCall ( p [ <NUM_LIT:2> ] , p [ <NUM_LIT:4> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_sysargs ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:3> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_sysargs_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_sysargs_empty ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( ) <EOL> def p_sysarg ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_function ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Function ( p [ <NUM_LIT:3> ] , p [ <NUM_LIT:2> ] , p [ <NUM_LIT:5> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_function_nowidth ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Function ( p [ <NUM_LIT:2> ] , <EOL> Width ( IntConst ( '<STR_LIT:0>' , lineno = p . lineno ( <NUM_LIT:1> ) ) , <EOL> IntConst ( '<STR_LIT:0>' , lineno = p . lineno ( <NUM_LIT:1> ) ) , <EOL> lineno = p . lineno ( <NUM_LIT:1> ) ) , <EOL> p [ <NUM_LIT:4> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_function_statement ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:2> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_funcvardecls ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:2> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_funcvardecls_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_funcvardecl ( self , p ) : <EOL> """<STR_LIT>""" <EOL> if isinstance ( p [ <NUM_LIT:1> ] , Decl ) : <EOL> for r in p [ <NUM_LIT:1> ] . list : <EOL> if ( not isinstance ( r , Input ) and not isinstance ( r , Reg ) and <EOL> not isinstance ( r , Integer ) ) : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_function_calc ( self , p ) : <EOL> """<STR_LIT>""" <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_functioncall ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = FunctionCall ( p [ <NUM_LIT:1> ] , p [ <NUM_LIT:3> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_func_args ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:3> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_func_args_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_func_args_empty ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( ) <EOL> def p_task ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Task ( p [ <NUM_LIT:2> ] , p [ <NUM_LIT:4> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_task_statement ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:2> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_taskvardecls ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] + ( p [ <NUM_LIT:2> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_taskvardecls_one ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( p [ <NUM_LIT:1> ] , ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_taskvardecls_empty ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = ( ) <EOL> def p_taskvardecl ( self , p ) : <EOL> """<STR_LIT>""" <EOL> if isinstance ( p [ <NUM_LIT:1> ] , Decl ) : <EOL> for r in p [ <NUM_LIT:1> ] . list : <EOL> if ( not isinstance ( r , Input ) and not isinstance ( r , Reg ) and <EOL> not isinstance ( r , Integer ) ) : <EOL> raise ParseError ( "<STR_LIT>" ) <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_task_calc ( self , p ) : <EOL> """<STR_LIT>""" <EOL> p [ <NUM_LIT:0> ] = p [ <NUM_LIT:1> ] <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_identifier ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Identifier ( p [ <NUM_LIT:1> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_scope_identifier ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Identifier ( p [ <NUM_LIT:2> ] , p [ <NUM_LIT:1> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_scope ( self , p ) : <EOL> '<STR_LIT>' <EOL> scope = ( ) if p [ <NUM_LIT:1> ] . scope is None else p [ <NUM_LIT:1> ] . scope . labellist <EOL> p [ <NUM_LIT:0> ] = IdentifierScope ( scope + ( IdentifierScopeLabel ( p [ <NUM_LIT:1> ] . name , lineno = p . lineno ( <NUM_LIT:1> ) ) , ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_scope_pointer ( self , p ) : <EOL> '<STR_LIT>' <EOL> scope = ( ) if p [ <NUM_LIT:1> ] . var . scope is None else p [ <NUM_LIT:1> ] . var . scope . labellist <EOL> p [ <NUM_LIT:0> ] = IdentifierScope ( scope + ( IdentifierScopeLabel ( p [ <NUM_LIT:1> ] . var . name , p [ <NUM_LIT:1> ] . ptr , lineno = p . lineno ( <NUM_LIT:1> ) ) , ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_disable ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = Disable ( p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_single_statement_delays ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = SingleStatement ( DelayStatement ( p [ <NUM_LIT:2> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_single_statement_systemcall ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = SingleStatement ( p [ <NUM_LIT:1> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_single_statement_disable ( self , p ) : <EOL> '<STR_LIT>' <EOL> p [ <NUM_LIT:0> ] = SingleStatement ( p [ <NUM_LIT:1> ] , lineno = p . lineno ( <NUM_LIT:1> ) ) <EOL> p . set_lineno ( <NUM_LIT:0> , p . lineno ( <NUM_LIT:1> ) ) <EOL> def p_empty ( self , p ) : <EOL> '<STR_LIT>' <EOL> pass <EOL> def p_error ( self , p ) : <EOL> print ( "<STR_LIT>" ) <EOL> if p : <EOL> self . _parse_error ( <EOL> '<STR_LIT>' % p . value , <EOL> self . _coord ( p . lineno ) ) <EOL> else : <EOL> self . _parse_error ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> class VerilogCodeParser ( object ) : <EOL> def __init__ ( self , filelist , preprocess_output = '<STR_LIT>' , <EOL> preprocess_include = None , <EOL> preprocess_define = None ) : <EOL> self . preprocess_output = preprocess_output <EOL> self . directives = ( ) <EOL> self . preprocessor = VerilogPreprocessor ( filelist , preprocess_output , <EOL> preprocess_include , <EOL> preprocess_define ) <EOL> self . parser = VerilogParser ( ) <EOL> def preprocess ( self ) : <EOL> self . preprocessor . preprocess ( ) <EOL> text = open ( self . preprocess_output ) . read ( ) <EOL> os . remove ( self . preprocess_output ) <EOL> return text <EOL> def parse ( self , preprocess_output = '<STR_LIT>' , debug = <NUM_LIT:0> ) : <EOL> text = self . preprocess ( ) <EOL> ast = self . parser . parse ( text , debug = debug ) <EOL> self . directives = self . parser . get_directives ( ) <EOL> return ast <EOL> def get_directives ( self ) : <EOL> return self . directives <EOL> def parse ( filelist , preprocess_include = None , preprocess_define = None ) : <EOL> codeparser = VerilogCodeParser ( filelist , <EOL> preprocess_include = preprocess_include , <EOL> preprocess_define = preprocess_define ) <EOL> ast = codeparser . parse ( ) <EOL> directives = codeparser . get_directives ( ) <EOL> return ast , directives </s>
