* @brief Prints symbol * * @param PVOID */
| 3774 | * @param PVOID |
| 3775 | */ |
| 3776 | void |
| 3777 | PrintSymbol(PVOID Symbol) |
| 3778 | { |
| 3779 | PSYMBOL Sym = (PSYMBOL)Symbol; |
| 3780 | |
| 3781 | if (Sym->Type & 0xffffffff00000000) |
| 3782 | { |
| 3783 | printf("Type = @VARGSTART\n"); |
| 3784 | return; |
| 3785 | } |
| 3786 | |
| 3787 | printf("Type = %s, ", SymbolTypeNames[Sym->Type]); |
| 3788 | |
| 3789 | if (Sym->Type == SYMBOL_SEMANTIC_RULE_TYPE) |
| 3790 | { |
| 3791 | printf("Value = %s\n", FunctionNames[Sym->Value]); |
| 3792 | } |
| 3793 | else if (Sym->Type == SYMBOL_STRING_TYPE) |
| 3794 | { |
| 3795 | printf("Value = %s\n", (char *)&Sym->Value); |
| 3796 | } |
| 3797 | else if (Sym->Type == SYMBOL_WSTRING_TYPE) |
| 3798 | { |
| 3799 | printf("Value = %ls\n", (wchar_t *)&Sym->Value); |
| 3800 | } |
| 3801 | else |
| 3802 | { |
| 3803 | printf("Value = %lld\n", Sym->Value); |
| 3804 | } |
| 3805 | } |
| 3806 | |
| 3807 | /** |
| 3808 | * @brief Converts Token to Symbol and returns the reference to it |