internal CharacterValue CreateCharacterValue(CodeElementsParser.CharacterValue4Context context)
 {
     if (context.figurativeConstant() != null && context.figurativeConstant().symbolicCharacterReference() != null)
     {
         SymbolReference symbolicCharacterReference = CreateSymbolReference(context.figurativeConstant().symbolicCharacterReference().symbolReference10(), SymbolType.SymbolicCharacter);
         return new CharacterValue(symbolicCharacterReference);
     }
     else
     {
         Token valueToken = ParseTreeUtils.GetFirstToken(context);
         return new CharacterValue(valueToken);
     }
 }
        internal RepeatedCharacterValue CreateRepeatedCharacterValue(CodeElementsParser.RepeatedCharacterValue2Context context)
        {
            Token optionalALLToken = null;
            if (context.allFigurativeConstant() != null)
            {
                optionalALLToken = ParseTreeUtils.GetFirstToken(context);
            }

            CodeElementsParser.FigurativeConstantContext figurativeConstantContext = context.figurativeConstant();
            if(context.allFigurativeConstant() != null && context.allFigurativeConstant().figurativeConstant() != null)
            {
                figurativeConstantContext = context.allFigurativeConstant().figurativeConstant();
            }

            if (figurativeConstantContext != null && figurativeConstantContext.symbolicCharacterReference() != null)
            {
                SymbolReference symbolicCharacterReference = CreateSymbolReference(figurativeConstantContext.symbolicCharacterReference().symbolReference10(), SymbolType.SymbolicCharacter);
                return new RepeatedCharacterValue(optionalALLToken, symbolicCharacterReference);
            }
            else
            {
                IParseTree valueNode = figurativeConstantContext;
                if(valueNode == null)
                {
                    valueNode = context.allFigurativeConstant().notNullTerminatedAlphanumericOrNationalLiteralToken();
                }
                Token valueToken = ParseTreeUtils.GetFirstToken(valueNode);
                return new RepeatedCharacterValue(optionalALLToken, valueToken);
            }
        }
 internal CharacterValue CreateCharacterValue(CodeElementsParser.CharacterValue2Context context)
 {
     if (context.figurativeConstant() != null && context.figurativeConstant().symbolicCharacterReference() != null)
         return new CharacterValue(CreateSymbolReference(context.figurativeConstant().symbolicCharacterReference().symbolReference10(), SymbolType.SymbolicCharacter));
     return new CharacterValue(ParseTreeUtils.GetFirstToken(context));
 }