# Copyright CERN, CH-1211 Geneva 23, 2004-2006, All rights reserved. # # Permission to use, copy, modify, and distribute this software for any # purpose is hereby granted without fee, provided that this copyright and # permissions notice appear in all copies and derivatives. # # This software is provided "as is" without express or implied warranty. """ GCC C++ name demangle python module Reference: http://www.codesourcery.com/cxx-abi/abi.html The encoding is formalized as a derivation grammar along with the explanatory text, in a modified BNF with the following conventions: - Non-terminals are delimited by diamond braces: "<>". - spaces are to be ignored. - Text beginning with '#' is comments, to be ignored. - Tokens in square brackets "[]" are optional. - Tokens are placed in parentheses "()" for grouping purposes. - '*' repeats the preceding item 0 or more times. - '+' repeats the preceding item 1 or more times. - All other characters are terminals, representing themselves. ::= _Z ::= ::= ::= ::= ::= ::= ::= # See Scope Encoding below ::= ::= St # ::std:: ::= ::= ::= N [] E ::= N [] E ::= ::= ::= ::= # empty ::= ::=