-í
_Ôj<c    J   s     d  k  l Z  d k Z d k Z d k Z ! d k Z d k Z % d d d d d d d d	 d
 d d d d d d d d d d d d d d d d d d d d d d  d! d" d# d$ d% d& d' d( d) d* d+ d, d- d. d/ d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d: d; d< d= d> d? d@ dA dB dC dD dE dF dG dH dI dJ dK gJ Z 2 dL „  Z : dM f  dN „  ƒ  YZ	 Á dO f  dP „  ƒ  YZ
 e e _ dQ „  Z dR e i f dS „  ƒ  YZ d S(T   (   s
   idlvisitorNs   ands   and_eqs   asms   autos   bitands   bitors   bools   breaks   cases   catchs   chars   classs   compls   consts
   const_casts   continues   defaults   deletes   dos   doubles   dynamic_casts   elses   enums   explicits   exports   externs   falses   floats   fors   friends   gotos   ifs   inlines   ints   longs   mutables	   namespaces   news   nots   not_eqs   operators   ors   or_eqs   privates	   protecteds   publics   registers   reinterpret_casts   returns   shorts   signeds   sizeofs   statics   static_casts   structs   switchs   templates   thiss   throws   trues   trys   typedefs   typeids   typenames   unions   unsigneds   usings   virtuals   voids   volatiles   wchar_ts   whiles   xors   xor_eqc    sN   2 4 5 x7 t  D5 ], } 6 | |  j o 7 t i d |  Sn q W8 |  Sd S(   sg   id.mapID(identifier string): string
       Returns the identifier with an escape if it is a C++ keywords   Reserved PrefixN(   s   reservedWordss   is
   identifiers   configs   state(   s
   identifiers   i(    (    s   ./cxx/id.pys   mapID2 s   
 	s   Namec      sÂ   : d  Z  < = d „  Z D d d „ Z N d „  Z S d „  Z Y d „  Z b d „  Z k d „  Z p d d	 d
 „ Z } d „  Z	 ƒ d „  Z
  d d „ Z ® d „  Z ¹ d „  Z ¾ d „  Z RS(   sJ   Encapsulates an IDL identifier and facilitates its mapping into
       C++c    s.   = > @ | |  _ A d |  _ B d |  _ d S(   s1   Create a Name object from a fully scoped IDL names    N(   s
   scopedNames   selfs   _Name__scopedNames   _Name__prefixs   _Name__suffix(   s   selfs
   scopedName(    (    s   ./cxx/id.pys   __init__= s   i   c    sc   D F G |  i } H | o H |  i ƒ  } n I |  i | ƒ } J | t | ƒ d } L | Sd S(   sl   simple(id.Name, cxx boolean): string
           Returns the 'simple' part of the name with the scope removedi   N(   s   selfs   _Name__scopedNames   sns   cxxs   _Name__map_cxxs   _Name__apply_presuffixs   lens   sname(   s   selfs   cxxs   snames   sn(    (    s   ./cxx/id.pys   simpleD s   
 c    s(   N P Q |  i d t |  i ƒ d !Sd S(   sD   scope(id.Name): string list
           Returns the scope of the namei    i   N(   s   selfs   _Name__scopedNames   len(   s   self(    (    s   ./cxx/id.pys   scopeN s   c    sT   S U | d t | ƒ d !} V | t | ƒ d } W | |  i | |  i g Sd  S(   Ni    i   (   s
   scopedNames   lens   scopes   names   selfs   _Name__prefixs   _Name__suffix(   s   selfs
   scopedNames   scopes   name(    (    s   ./cxx/id.pys   __apply_presuffixS s   c    s>   Y \ ] t  |  i ƒ } ^ | | _ _ |  i | _ ` | Sd S(   sm   prefix(id.Name): id.Name
           Add a prefix to the name
               ie ::A::B::C -> ::A::B::_objref_CN(   s   Names   selfs   _Name__scopedNames   news   prefixs   _Name__prefixs   _Name__suffix(   s   selfs   prefixs   new(    (    s   ./cxx/id.pys   prefixY s
   c    s>   b e f t  |  i ƒ } g |  i | _ h | | _ i | Sd S(   si   suffix(id.Name): id.Name
           Add a suffix to the name
               ie ::A::B::C -> ::A::B::C_ptrN(   s   Names   selfs   _Name__scopedNames   news   _Name__prefixs   suffixs   _Name__suffix(   s   selfs   suffixs   new(    (    s   ./cxx/id.pys   suffixb s
   c    s   k n t  t |  i ƒ Sd  S(   N(   s   maps   mapIDs   selfs   _Name__scopedName(   s   self(    (    s   ./cxx/id.pys	   __map_cxxk s   i    c    s|   p r s | o s |  i ƒ  } n t |  i } v |  i | ƒ } x | o x d } n
 y d } { | t i	 | d ƒ Sd S(   s‰   fullyQualify(id.Name, cxx boolean, include_root boolean): string
           Returns a fully qualified C++ name (initial root :: optional)s   ::s    N(
   s   cxxs   selfs   _Name__map_cxxs   sns   _Name__scopedNames   _Name__apply_presuffixs   include_roots   names   strings   join(   s   selfs   cxxs   include_roots   names   sn(    (    s   ./cxx/id.pys   fullyQualifyp s   
 
 	c    s   } €  |  i |  i ƒ Sd S(   s˜   fullName(id.Name): string list
           Returns the fully scopedname (with prefixes and suffixes as
           appropriate) as a string component listN(   s   selfs   _Name__apply_presuffixs   _Name__scopedName(   s   self(    (    s   ./cxx/id.pys   fullName} s   c    sÕ   ƒ † ˆ |  i } ‰ | i ƒ  Š | d g } ‹ | d = t } Ž xˆ Ž d o}  | i | ƒ } “ | t j o | i |  i j o ” | Sn • | g  j o ˜ t Sn š | d g | } › | d =qI Wd S(   s’   relName(id.Name, id.Environment): string list
           Returns a list of the name components essential to making
           the name unambiguousi    i   N(	   s   selfs   _Name__scopedNames   sns   reverses   relNames   Nones   names   environments   lookup(   s   selfs   environments   relNames   sns   name(    (    s   ./cxx/id.pys   relNameƒ s   
	 
#c    s²    Ÿ ¡ | t j o ¢ |  i | ƒ Sn ¤ |  i | ƒ } ¥ | t j o § |  i d | d d ƒ Sn © | o © t t | ƒ } n ª |  i | ƒ } « t	 i
 | d ƒ Sd S(   s‰   unambiguous(id.Name, id.Environment option, cxx boolean): string
           Returns the unambiguous C++ name for a particular environments   cxxs   include_rooti   s   ::N(   s   environments   Nones   selfs   fullyQualifys   cxxs   relNames   maps   mapIDs   _Name__apply_presuffixs   strings   join(   s   selfs   environments   cxxs   relName(    (    s   ./cxx/id.pys   unambiguous s   
 c    s?   ® ° ± d „  } µ t | |  i ƒ } · t i | d ƒ Sd S(   sZ   guard(id.Name): string
           Produces a flattened guard string suitable for an #ifdefc    s5   ± ³ t  i d d |  ƒ }  ´ t  i d d |  ƒ Sd  S(   Ns   _s   __s   \W(   s   res   subs   text(   s   text(    (    s   ./cxx/id.pys   escapeChars± s   s   _mN(   s   escapeCharss   maps   selfs   _Name__scopedNames
   scopedNames   strings   join(   s   selfs   escapeCharss
   scopedName(    (    s   ./cxx/id.pys   guard® s   c    s    ¹ » ¼ t  i |  i d ƒ Sd S(   sN   hash(id.Name): string
           Returns a hashable unique key for this objects   /N(   s   strings   joins   selfs   _Name__scopedName(   s   self(    (    s   ./cxx/id.pys   hash¹ s   c    s   ¾ ¿ t  i |  i d ƒ Sd  S(   Ns   /(   s   strings   joins   selfs   _Name__scopedName(   s   self(    (    s   ./cxx/id.pys   __str__¾ s   (   s   __doc__s   __init__s   simples   scopes   _Name__apply_presuffixs   prefixs   suffixs   _Name__map_cxxs   fullyQualifys   fullNames   relNames   unambiguouss   guards   hashs   __str__(    (    (    s   ./cxx/id.pys   Name: s   	
		s   Environmentc      st   Á d  Z  Ä Å d „  Z É d „  Z Ñ e d „ Z ß d „  Z è d d „ Z ó d „  Z d „  Z d	 „  Z	 RS(
   s¤   An environment encapsulates the naming environment at a point
       in the AST. The environment consists of both a scope and a set
       of already defined names.c    s   Å Æ g  |  _ Ç h  |  _ d  S(   N(   s   selfs   _Environment__scopes   _Environment__names(   s   self(    (    s   ./cxx/id.pys   __init__Å s   c    sB   É Ë Ì t  ƒ  } Í |  i | _ Î |  i i ƒ  | _ Ï | Sd S(   s@   copy(id.Environment): id.Environment
           Copy constructorN(   s   Environments   news   selfs   _Environment__scopes   _Environment__namess   copy(   s   selfs   new(    (    s   ./cxx/id.pys   copyÉ s
   c    s†   Ñ Ó Ô t  ƒ  } Õ |  i | g | _ Ö |  i i ƒ  | _ Ù | o4 Ú t o t	 | t
 i ƒ p t ‚ Û | | _ n Ý | Sd S(   s}   enter(id.Environment, scope_name string, interface option)
           Creates and returns a new environment for the new scopeN(   s   Environments   news   selfs   _Environment__scopes
   scope_names   _Environment__namess   copys	   interfaces	   __debug__s
   isinstances   idlasts	   Interfaces   AssertionErrors   _Environment__interface(   s   selfs
   scope_names	   interfaces   new(    (    s   ./cxx/id.pys   enterÑ s   
$c    sU   ß â ã t  ƒ  } ä |  i d t |  i ƒ d !| _ å |  i i ƒ  | _ æ | Sd S(   s‡   leave(id.Environment): id.Environment
           Returns an environment representing the outer scope. Defined
           names are kepti    i   N(   s   Environments   news   selfs   _Environment__scopes   lens   _Environment__namess   copy(   s   selfs   new(    (    s   ./cxx/id.pys   leaveß s
   #i    c    st   è ì í t  | ƒ } î | i ƒ  } ï |  i i | ƒ o | o ð t i	 d t
 | ƒ ƒ n ñ | |  i | <d S(   sø   addName(id.Environment, scopedName, allow_already_exists boolean)
           Adds a new scopedName to the current environment. Will throw
           a fatal exception if it already exists (unless the
           allow_already_exists flag is set to 1s#   Attempt to redefine existing name: N(   s   Names
   scopedNames   names   hashs   selfs   _Environment__namess   has_keys   allow_already_existss   utils
   fatalErrors   str(   s   selfs
   scopedNames   allow_already_existss   hashs   name(    (    s   ./cxx/id.pys   addNameè s   c    s¢   ó ÷ ø |  i } ù x… ù d oz ú t | | ƒ } û |  i i | i ƒ  ƒ o ü |  i | i ƒ  Sn ý | g  j o þ t	 Sn ÿ | t
 | ƒ d =q Wd S(   sÛ   lookup(id.Environment, relName): id.Name option
           Searches for a relative scoped name in the same manner as C++,
           returning the Name object it refers to, or None if there is
           nothing to findi   N(   s   selfs   _Environment__scopes   scopes   Names   relNames   names   _Environment__namess   has_keys   hashs   Nones   len(   s   selfs   relNames   names   scope(    (    s   ./cxx/id.pys   lookupó s    
c    s   |  i Sd S(   sM   scope(id.Environment): scope string list
           Returns the current scopeN(   s   selfs   _Environment__scope(   s   self(    (    s   ./cxx/id.pys   scopes   c    s¬   d } | d t |  i ƒ d } 	| d } 
g  } x7 |  i i ƒ  D]# } | i t	 |  i | ƒ ƒ qS W| t | ƒ d } | d } | Sd  S(   Ns   Environment {
s	   	scope = s   
s	   	names = s   }(
   s   texts   reprs   selfs   _Environment__scopes   namess   _Environment__namess   keyss   hashkeys   appends   str(   s   selfs   hashkeys   namess   text(    (    s   ./cxx/id.pys   __str__s   		 	!(
   s   __doc__s   __init__s   copys   Nones   enters   leaves   addNames   lookups   scopes   __str__(    (    (    s   ./cxx/id.pys   EnvironmentÁ s   		c    sZ   y t  i |  SWn8 t j
 o) t i d d t |  ƒ d ƒ n Xd S(   s    lookup : AST node -> Environments0   Failed to find environment corresponding to nodes    (= s   )N(   s   ids   _environmentss   nodes   KeyErrors   utils
   fatalErrors   repr(   s   node(    (    s   ./cxx/id.pys   lookups
   s   WalkTreec      s  d  Z  !"d „  Z %d „  Z (d d „ Z /d „  Z 6d „  Z ?d „  Z Ed „  Z Rd	 „  Z ]d
 „  Z	 cd „  Z
 id „  Z od „  Z xd „  Z d „  Z Œd „  Z —d „  Z ©d „  Z «d „  Z ­d „  Z ¯d „  Z RS(   sM   Walks over the AST once building the hash of
       AST nodes -> Environmentsc    s   "#|  i i | ƒ |  _ d  S(   N(   s   selfs   _WalkTree__envs   enters   name(   s   selfs   name(    (    s   ./cxx/id.pys   __enter"s   c    s   %&|  i i ƒ  |  _ d  S(   N(   s   selfs   _WalkTree__envs   leave(   s   self(    (    s   ./cxx/id.pys   __leave%s   i    c    sX   ()|  i i ƒ  } *|  i i ƒ  | g } +| i | | ƒ ,| |  _ -d  Sd  S(   N(	   s   selfs   _WalkTree__envs   copys   news   scopes   names
   scopedNames   addNames   allow_already_exists(   s   selfs   names   allow_already_existss   news
   scopedName(    (    s   ./cxx/id.pys   __add(s
   c    sH   /0t  i i | ƒ o 1t i d d ƒ n 3|  i t  i | <d  S(   Ns+   Unexpected inconsistency: encountered node s%   more than once while walking the tree(   s   ids   _environmentss   has_keys   nodes   utils
   fatalErrors   selfs   _WalkTree__env(   s   selfs   node(    (    s   ./cxx/id.pys   __cache/s   c    s^   67h  t  _ 9t ƒ  |  _ :d d g g } ;x$ | D;] } <|  i i | ƒ q: Wd  S(   Ns   CORBAs   Object(   s   ids   _environmentss   Environments   selfs   _WalkTree__envs
   predefineds
   scopedNames   addName(   s   selfs
   predefineds
   scopedName(    (    s   ./cxx/id.pys   __init__6s   
 	c    sD   ?@x' | i ƒ  D@] } A| i |  ƒ q WC|  i | ƒ d  S(   N(   s   nodes   declarationss   ns   accepts   selfs   _WalkTree__cache(   s   selfs   nodes   n(    (    s   ./cxx/id.pys   visitAST?s    	c    s†   EF| i ƒ  } H|  i | d d ƒJ|  i | ƒ Kx' | i ƒ  DK] } L| i |  ƒ qH WM|  i	 ƒ  O|  i
 | ƒ d  S(   Ns   allow_already_existsi   (   s   nodes
   identifiers   names   selfs   _WalkTree__adds   _WalkTree__enters   definitionss   ns   accepts   _WalkTree__leaves   _WalkTree__cache(   s   selfs   nodes   names   n(    (    s   ./cxx/id.pys   visitModuleEs    	c    s†   RS| i ƒ  } T|  i | d d ƒV|  i | ƒ Wx' | i ƒ  DW] } X| i |  ƒ qH WY|  i	 ƒ  [|  i
 | ƒ d  S(   Ns   allow_already_existsi   (   s   nodes
   identifiers   names   selfs   _WalkTree__adds   _WalkTree__enters   declarationss   ns   accepts   _WalkTree__leaves   _WalkTree__cache(   s   selfs   nodes   names   n(    (    s   ./cxx/id.pys   visitInterfaceRs    	c    s<   ]^| i ƒ  } _|  i | d d ƒa|  i | ƒ d  S(   Ns   allow_already_existsi   (   s   nodes
   identifiers   names   selfs   _WalkTree__adds   _WalkTree__cache(   s   selfs   nodes   name(    (    s   ./cxx/id.pys   visitForward]s   c    sB   cdt  | i ƒ  ƒ i ƒ  } e|  i | ƒ g|  i | ƒ d  S(   N(   s   Names   nodes
   scopedNames   simples   names   selfs   _WalkTree__adds   _WalkTree__cache(   s   selfs   nodes   name(    (    s   ./cxx/id.pys
   visitConstcs   c    sB   ijt  | i ƒ  ƒ i ƒ  } k|  i | ƒ m|  i | ƒ d  S(   N(   s   Names   nodes
   scopedNames   simples   names   selfs   _WalkTree__adds   _WalkTree__cache(   s   selfs   nodes   name(    (    s   ./cxx/id.pys   visitDeclaratoris   c    st   op| i ƒ  o  q| i ƒ  i ƒ  i |  ƒ n sx' | i ƒ  Ds] } t| i |  ƒ qC Wv|  i | ƒ d  S(   N(	   s   nodes
   constrTypes	   aliasTypes   decls   accepts   selfs   declaratorss   ds   _WalkTree__cache(   s   selfs   nodes   d(    (    s   ./cxx/id.pys   visitTypedefos     	c    st   xy| i ƒ  o  z| i ƒ  i ƒ  i |  ƒ n |x' | i ƒ  D|] } }| i |  ƒ qC W|  i | ƒ d  S(   N(	   s   nodes
   constrTypes
   memberTypes   decls   accepts   selfs   declaratorss   ds   _WalkTree__cache(   s   selfs   nodes   d(    (    s   ./cxx/id.pys   visitMemberxs     	c    s€   ‚| i ƒ  } ƒ|  i | ƒ …|  i | ƒ †x' | i ƒ  D†] } ‡| i |  ƒ qB Wˆ|  i	 ƒ  Š|  i
 | ƒ d  S(   N(   s   nodes
   identifiers   names   selfs   _WalkTree__adds   _WalkTree__enters   memberss   ns   accepts   _WalkTree__leaves   _WalkTree__cache(   s   selfs   nodes   names   n(    (    s   ./cxx/id.pys   visitStructs    	c    s€   Œ| i ƒ  } Ž|  i | ƒ |  i | ƒ ‘x' | i ƒ  D‘] } ’| i |  ƒ qB W“|  i	 ƒ  •|  i
 | ƒ d  S(   N(   s   nodes
   identifiers   names   selfs   _WalkTree__adds   _WalkTree__enters   memberss   ns   accepts   _WalkTree__leaves   _WalkTree__cache(   s   selfs   nodes   names   n(    (    s   ./cxx/id.pys   visitExceptionŒs    	c    sÐ   —˜| i ƒ  } ™|  i | ƒ ›|  i | ƒ | i ƒ  o  ž| i ƒ  i ƒ  i	 |  ƒ n ¡xG | i
 ƒ  D¡]6 } ¢| i ƒ  o  £| i ƒ  i ƒ  i	 |  ƒ n qr W¥|  i ƒ  §|  i | ƒ d  S(   N(   s   nodes
   identifiers   names   selfs   _WalkTree__adds   _WalkTree__enters
   constrTypes
   switchTypes   decls   accepts   casess   ns   caseTypes   _WalkTree__leaves   _WalkTree__cache(   s   selfs   nodes   names   n(    (    s   ./cxx/id.pys
   visitUnion—s     	$c    s
   ©ªd  S(   N(    (   s   selfs   node(    (    s   ./cxx/id.pys   visitCaseLabel©s   c    s
   «¬d  S(   N(    (   s   selfs   node(    (    s   ./cxx/id.pys   visitUnionCase«s   c    s
   ­®d  S(   N(    (   s   selfs   node(    (    s   ./cxx/id.pys   visitEnumerator­s   c    si   ¯°| i ƒ  } ±|  i | ƒ ³x- | i ƒ  D³] } ´|  i | i ƒ  ƒ q2 W¶|  i | ƒ d  S(   N(   s   nodes
   identifiers   names   selfs   _WalkTree__adds   enumeratorss   values   _WalkTree__cache(   s   selfs   nodes   names   value(    (    s   ./cxx/id.pys	   visitEnum¯s    	(   s   __doc__s   _WalkTree__enters   _WalkTree__leaves   _WalkTree__adds   _WalkTree__caches   __init__s   visitASTs   visitModules   visitInterfaces   visitForwards
   visitConsts   visitDeclarators   visitTypedefs   visitMembers   visitStructs   visitExceptions
   visitUnions   visitCaseLabels   visitUnionCases   visitEnumerators	   visitEnum(    (    (    s   ./cxx/id.pys   WalkTrees*   				(   s   omniidls
   idlvisitors   ids   configs   utils   strings   res   reservedWordss   mapIDs   Names   Environments   Nones   _environmentss   lookups
   AstVisitors   WalkTree(   s   Environments   reservedWordss   WalkTrees   strings
   idlvisitors   mapIDs   utils   res   lookups   configs   ids   Name(    (    s   ./cxx/id.pys   ? s   ç‡S