3 gwU:@s4GdddeZGdddeZGdddeZdS)c@s&eZdZdZd Zd ddZd d ZdS) Coordz Coordinates of a syntactic element. Consists of: - File name - Line number - (optional) column number, for the Lexer filelinecolumn __weakref__NcCs||_||_||_dS)N)rrr)selfrrrr/usr/lib/python3.6/plyparser.py__init__szCoord.__init__cCs(d|j|jf}|jr$|d|j7}|S)Nz%s:%sz:%s)rrr)rstrrrr__str__sz Coord.__str__)rrrr)N)__name__ __module__ __qualname____doc__ __slots__r r rrrrr s rc@s eZdZdS) ParseErrorN)r r rrrrrrsrc@s&eZdZddZdddZddZdS) PLYParsercCs<|d}dd}d||f|_d||_t|j|j|dS)z Given a rule name, creates an optional ply.yacc rule for it. The name of the optional rule is _opt Z_optcSs|d|d<dS)Nr)rprrroptrule)sz+PLYParser._create_opt_rule..optrulez%s : empty | %szp_%sN)rr setattr __class__)rZrulenameZoptnamerrrr_create_opt_rule"s  zPLYParser._create_opt_ruleNcCst|jj||dS)N)rrr)rZclexfilename)rlinenorrrr_coord0szPLYParser._coordcCstd||fdS)Nz%s: %s)r)rmsgZcoordrrr _parse_error6szPLYParser._parse_error)N)r r rrrrrrrrr!s rN)objectr Exceptionrrrrrr s