Example #1
0
 public void VisitUnknown(UnknownType t)
 {
     if (!Unknowns.Contains(t.Index))
     {
         Unknowns.Add(t.Index);
     }
 }
Example #2
0
        public DataType VisitReference(ReferenceType_v1 reference)
        {
            DataType dt;

            if (reference.Referent == null)
            {
                dt = new UnknownType();
            }
            else
            {
                dt = reference.Referent.Accept(this);
            }
            return(new ReferenceTo(dt));
        }
Example #3
0
        public DataType VisitPointer(PointerType_v1 pointer)
        {
            DataType dt;

            if (pointer.DataType == null)
            {
                dt = new UnknownType();
            }
            else
            {
                dt = pointer.DataType.Accept(this);
            }
            return(new Pointer(dt, platform.PointerType.Size));
        }
Example #4
0
        public void AppBld_NoVariadic_Characteristics()
        {
            var caller = new Procedure(arch, "caller", Address.Ptr32(0x00123400), new Frame(PrimitiveType.Ptr32));
            var callee = new Procedure(arch, "callee", Address.Ptr32(0x00123500), new Frame(PrimitiveType.Ptr32));
            var ab     = arch.CreateFrameApplicationBuilder(
                caller.Frame,
                new CallSite(4, 0),
                new ProcedureConstant(PrimitiveType.Ptr32, callee));
            var unk   = new UnknownType();
            var sig   = FunctionType.Action(new Identifier("...", unk, new StackArgumentStorage(0, unk)));
            var instr = ab.CreateInstruction(sig, null);

            Assert.AreEqual("callee(0x00000000)", instr.ToString());//$BUG: obviously wrong
        }
 public static void Main()
 {
     Expression.Property(Expression.Parameter(typeof(int), ""), typeof(ExpressionPropertyString), nameof(BasicProperty));
     Expression.Property(null, typeof(ExpressionPropertyString), nameof(StaticProperty));
     Expression.Property(null, typeof(Derived), "ProtectedPropertyOnBase");
     Expression.Property(null, typeof(Derived), "PublicPropertyOnBase");
     UnknownType.Test();
     TestNull();
     TestNoValue();
     TestNullString();
     TestEmptyString();
     TestNoValueString();
     UnknownString.Test();
     Expression.Property(null, GetType(), "This string will not be reached");               // IL2072
 }
        public DataType VisitMemberPointer(MemberPointer_v1 memptr)
        {
            var      baseType = memptr.DeclaringClass.Accept(this);
            DataType dt;

            if (memptr.MemberType == null)
            {
                dt = new UnknownType();
            }
            else
            {
                dt = memptr.MemberType.Accept(this);
            }
            return(new MemberPointer(baseType, dt, platform.PointerType.Size));
        }
Example #7
0
 public static void Main()
 {
     Expression.Field(Expression.Parameter(typeof(int), ""), typeof(ExpressionFieldString), "InstanceField");
     Expression.Field(null, typeof(ExpressionFieldString), "StaticField");
     Expression.Field(null, typeof(ExpressionFieldString), "StaticWithDAM");      // IL2110
     Expression.Field(null, typeof(Derived), "_protectedFieldOnBase");
     Expression.Field(null, typeof(Derived), "_publicFieldOnBase");               // IL2110
     UnknownType.Test();
     UnknownTypeNoAnnotation.Test();
     UnknownString.Test();
     Expression.Field(null, GetType(), "This string will not be reached");               // IL2072
     TestNullType();
     TestNoValue();
     TestNullString();
     TestEmptyString();
     TestNoValueString();
 }
Example #8
0
        public DataType VisitPointer(PointerType_v1 pointer)
        {
            DataType dt;

            if (pointer.DataType == null)
            {
                dt = new UnknownType();
            }
            else
            {
                try
                {
                    //$TODO: remove the try-catch when done.
                    dt = pointer.DataType.Accept(this);
#if FUTURE
                    //$HACK: this is a dangerous assumption, not all
                    // pointers to char are pointing to strings --
                    // but most (90% or more) do. With const char
                    // this rises to 99%
                    if (dt is PrimitiveType pt && pt.Domain == Domain.Character)
                    {
                        dt = StringType.NullTerminated(dt);
                    }
#endif
                }
                catch
                {
                    Debug.Print("** Dropping exception on floor ***********");
                    dt = new UnknownType(platform.PointerType.Size);
                }
            }
            int bitSize = platform.PointerType.BitSize;
            if (pointer.PointerSize != 0)
            {
                bitSize = pointer.PointerSize * platform.Architecture.MemoryGranularity;
            }
            return(new Pointer(dt, bitSize)
            {
                Qualifier = pointer.Qualifier
            });
        }
Example #9
0
        public string GetUnknownWetherReplyMessage(UnknownType type)
        {
            string unknownWord = "";

            switch (type)
            {
            case UnknownType.Day:
                unknownWord = "日";
                break;

            case UnknownType.Region:
                unknownWord = "地域";
                break;

            default:
                break;
            }
            string message = $"うーん、ごめんね。\nお姉さん、その{unknownWord}の天気は分からないよ……";

            return(message);
        }
Example #10
0
        public DataType VisitPointer(PointerType_v1 pointer)
        {
            DataType dt;

            if (pointer.DataType == null)
            {
                dt = new UnknownType();
            }
            else
            {
                try
                {
                    //$TODO: remove the try-catch when done.
                    dt = pointer.DataType.Accept(this);
                }
                catch
                {
                    dt = new UnknownType();
                }
            }
            return(new Pointer(dt, platform.PointerType.Size));
        }
Example #11
0
 private DataType TranslateFn(LLVMType retType, List<LLVMParameter> parameters, IStorageBinder binder)
 {
     var rt = retType.Accept(this);
     var sigRet = binder.CreateTemporary("", rt);
     var sigParameters = new List<Identifier>();
     foreach (var param in parameters)
     {
         if (param.name == "...")
         {
             var dt = new UnknownType();
             var id = binder.CreateTemporary("...", dt);
             sigParameters.Add(id);
         }
         else
         {
             var pt = param.Type.Accept(this);
             var id = binder.CreateTemporary(pt);
             sigParameters.Add(id);
         }
     }
     return new FunctionType(sigRet, sigParameters.ToArray());
 }
Example #12
0
        public DataType VisitPointer(PointerType_v1 pointer)
        {
            DataType dt;

            if (pointer.DataType == null)
            {
                dt = new UnknownType();
            }
            else
            {
                try
                {
                    //$TODO: remove the try-catch when done.
                    dt = pointer.DataType.Accept(this);
                }
                catch
                {
                    Debug.Print("** Dropping exception on floor ***********");
                    dt = new UnknownType(platform.PointerType.Size);
                }
            }
            return(new Pointer(dt, platform.PointerType.BitSize));
        }
Example #13
0
        //#endregion

        #region Name Resolving

        /// <summary>
        /// Resolves a function or type name using aliases and imported namespaces of the source unit.
        /// </summary>
        /// <param name="qualifiedName">Function qualified name to resolve. Doesn't resolve special names ("self", "parent").</param>
        /// <param name="kind">Declaration kind.</param>
        /// <param name="currentScope">Current scope.</param>
        /// <param name="alias">
        /// <B>null</B>, if the function name is resolved immediately.
        /// Otherwise, if the <paramref name="qualifiedName"/> is simple and an alias exists, contains its qualified target.
        /// </param>
        /// <param name="errors">Error sink or <B>null</B> if errors shouldn't be reported.</param>
        /// <param name="position">Position where to report an error.</param>
        /// <param name="mustResolve">Whether name must be resolved if possible.</param>
        /// <returns>
        /// Resolved member, the unknown member, or <B>null</B> if error reporting is disabled (errors == null).
        /// </returns>
        /// <remarks>
        /// If the name is simple, is not resolved and has an alias then the run-time resolve should be run on the alias.
        /// If the name is simple, is not resolved and hasn't an alias, the run-time resolve should be run on the name
        ///		within the naming context of the source unit (i.e. imported namespaces should be considered).
        /// If the name is fully qualified and is not resolved then then the run-time resolve should be run on the name itself.
        /// </remarks>
        private DMember ResolveName(QualifiedName qualifiedName, DeclarationKind kind, Scope currentScope,
                                    out QualifiedName?alias, ErrorSink errors, Position position, bool mustResolve)
        {
            string  full_name = null;
            DMember result;

            alias = null;

            // try exact match:
            result = ResolveExactName(qualifiedName, ref full_name, kind, currentScope, mustResolve);
            if (result != null)
            {
                return(result);
            }

            /*  // aliases are resolved in parse-time
             *          // try explicit aliases:
             *          if (qualifiedName.IsSimpleName)
             *          {
             *                  QualifiedName alias_qualified_name;
             *
             *                  Dictionary<Name, QualifiedName> aliases = null;
             *                  switch (kind)
             *                  {
             *                          case DeclarationKind.Type: aliases = typeAliases; break;
             *                          case DeclarationKind.Function: aliases = functionAliases; break;
             *                          case DeclarationKind.Constant: aliases = constantAliases; break;
             *                  }
             *
             *                  // try alias:
             *                  if (aliases != null && aliases.TryGetValue(qualifiedName.Name, out alias_qualified_name))
             *                  {
             *                          // alias exists //
             *
             *                          full_name = null;
             *                          result = ResolveExactName(alias_qualified_name, ref full_name, kind, currentScope, mustResolve);
             *                          if (result != null)
             *                                  return result;
             *
             *                          alias = alias_qualified_name;
             *
             *                          switch (kind)
             *                          {
             *                                  case DeclarationKind.Type: result = new UnknownType(full_name); break;
             *                                  case DeclarationKind.Function: result = new UnknownFunction(full_name); break;
             *                                  case DeclarationKind.Constant: result = new UnknownGlobalConstant(full_name); break;
             *                          }
             *
             *                          return result;
             *                  }
             *          }
             */

            // try imported namespaces:
            if (!qualifiedName.IsFullyQualifiedName && HasImportedNamespaces)
            {
                result = null;

                foreach (QualifiedName imported_ns in importedNamespaces)
                {
                    QualifiedName combined_qualified_name = new QualifiedName(qualifiedName, imported_ns);
                    full_name = null;

                    DMember candidate = ResolveExactName(combined_qualified_name, ref full_name, kind, currentScope, mustResolve);
                    if (candidate != null)
                    {
                        if (result != null)
                        {
                            if (errors != null)
                            {
                                ErrorInfo error;
                                switch (kind)
                                {
                                case DeclarationKind.Type: error = Errors.AmbiguousTypeMatch; break;

                                case DeclarationKind.Function: error = Errors.AmbiguousFunctionMatch; break;

                                case DeclarationKind.Constant: error = Errors.AmbiguousConstantMatch; break;

                                default: throw null;
                                }

                                errors.Add(error, this, position, result.FullName, candidate.FullName, qualifiedName.Name);
                            }
                        }
                        else
                        {
                            result = candidate;
                        }
                    }
                }

                if (result != null)
                {
                    return(result);
                }
            }

            // unknown qualified name:
            if (errors != null)
            {
                switch (kind)
                {
                case DeclarationKind.Type: result = new UnknownType(qualifiedName.ToString()); break;

                case DeclarationKind.Function: result = new UnknownFunction(qualifiedName.ToString()); break;

                case DeclarationKind.Constant: result = new UnknownGlobalConstant(qualifiedName.ToString()); break;
                }

                return(result);
            }

            return(null);
        }
			public CountDownTimerAnonymousInnerClassHelper(POSPrinterCommonFragment outerInstance, UnknownType MAX_VALUE) : base(MAX_VALUE, 1000)
			{
				this.outerInstance = outerInstance;
			}
Example #15
0
        /** Parses a \c create statement, which introduces a new symbol name in the current scope. */
        private CreateStatement ParseCreateStatement()
        {
            Token start = _matcher.This;

            _matcher.Match(TokenKind.Keyword_Create);
            _matcher.Match(TokenKind.Space);

            Token token = _matcher.Match(TokenKind.Name);
            var name = new SymbolDefinition(token.Cursor, token.Text, SymbolKind.Variable);

            Type type = null;
            if (_matcher.This.Kind == TokenKind.Space && _matcher.Next.Kind == TokenKind.Keyword_Is)
            {
                _matcher.Match(TokenKind.Space);
                _matcher.Match(TokenKind.Keyword_Is);
                _matcher.Match(TokenKind.Space);
                type = ParseType();
            }

            Expression initializer = null;
            if (_matcher.This.Kind == TokenKind.Space && _matcher.Next.Kind == TokenKind.Assign_Identity)
            {
                _matcher.Match(TokenKind.Space);
                _matcher.Match(TokenKind.Assign_Identity);
                _matcher.Match(TokenKind.Space);
                initializer = ParseExpression();
            }

            _matcher.Match(TokenKind.EndOfLine);

            if (type == null && initializer == null)
                throw new ParserError(name.Cursor, "Expected type and/or initalizer");

            if (type == null)
                type = new UnknownType(name.Cursor);
            if (initializer == null)
                initializer = new NoneLiteral(name.Cursor, new NoneType(name.Cursor));

            return new CreateStatement(start.Cursor, name, type, initializer);
        }
Example #16
0
        /// <summary>
        /// Deserializes the signature <paramref name="ss"/>. Any instantiated
        /// registers or stack variables are introduced into the Frame.
        /// </summary>
        /// <param name="ss"></param>
        /// <param name="frame"></param>
        /// <returns></returns>
        public FunctionType Deserialize(SerializedSignature ss, Frame frame)
        {
            if (ss == null)
            {
                return(null);
            }
            var retAddrSize = this.Architecture.PointerType.Size;   //$TODO: deal with near/far calls in x86-realmode

            if (!ss.ParametersValid)
            {
                return(new FunctionType
                {
                    StackDelta = ss.StackDelta,
                    ReturnAddressOnStack = retAddrSize,
                });
            }

            var parameters = new List <Identifier>();

            Identifier ret = null;

            if (UseUserSpecifiedStorages(ss))
            {
                this.argDeser = new ArgumentDeserializer(
                    this,
                    Architecture,
                    frame,
                    retAddrSize,
                    Architecture.WordWidth.Size);

                int fpuDelta = FpuStackOffset;
                FpuStackOffset = 0;
                if (ss.ReturnValue != null)
                {
                    ret       = DeserializeArgument(ss.ReturnValue, -1, "");
                    fpuDelta += FpuStackOffset;
                }

                FpuStackOffset = 0;
                if (ss.Arguments != null)
                {
                    for (int iArg = 0; iArg < ss.Arguments.Length; ++iArg)
                    {
                        var sArg = ss.Arguments[iArg];
                        var arg  = DeserializeArgument(sArg, iArg, ss.Convention);
                        parameters.Add(arg);
                    }
                }
                fpuDelta      -= FpuStackOffset;
                FpuStackOffset = fpuDelta;
                var sig = new FunctionType(ret, parameters.ToArray())
                {
                    IsInstanceMetod = ss.IsInstanceMethod,
                };
                ApplyConvention(ss, sig);
                return(sig);
            }
            else
            {
                var dtRet = ss.ReturnValue != null && ss.ReturnValue.Type != null
                    ? ss.ReturnValue.Type.Accept(TypeLoader)
                    : null;

                var dtThis = ss.EnclosingType != null
                    ? new Pointer(ss.EnclosingType.Accept(TypeLoader), Architecture.PointerType.BitSize)
                    : null;
                var dtParameters = ss.Arguments != null
                    ? ss.Arguments
                                   .TakeWhile(p => p.Name != "...")
                                   .Select(p => p.Type.Accept(TypeLoader))
                                   .ToList()
                    : new List <DataType>();

                // A calling convention governs the storage of a the
                // parameters

                var cc  = platform.GetCallingConvention(ss.Convention);
                var res = new CallingConventionEmitter();
                cc.Generate(res, dtRet, dtThis, dtParameters);
                if (res.Return != null)
                {
                    var retReg = res.Return as RegisterStorage;
                    ret = new Identifier(retReg != null ? retReg.Name : "", dtRet, res.Return);
                }
                if (res.ImplicitThis != null)
                {
                    var param = new Identifier("this", dtThis, res.ImplicitThis);
                    parameters.Add(param);
                }
                if (ss.Arguments != null)
                {
                    for (int i = 0; i < ss.Arguments.Length; ++i)
                    {
                        if (ss.Arguments[i].Name == "...")
                        {
                            var unk = new UnknownType();
                            parameters.Add(new Identifier("...", unk, new StackArgumentStorage(0, unk)));
                        }
                        else
                        {
                            var name  = GenerateParameterName(ss.Arguments[i].Name, dtParameters[i], res.Parameters[i]);
                            var param = new Identifier(name, dtParameters[i], res.Parameters[i]);
                            parameters.Add(param);
                        }
                    }
                }
                var ft = new FunctionType(ret, parameters.ToArray())
                {
                    IsInstanceMetod = ss.IsInstanceMethod,
                    StackDelta      = ss.StackDelta != 0
                        ? ss.StackDelta
                        : res.StackDelta,
                    FpuStackDelta        = res.FpuStackDelta,
                    ReturnAddressOnStack = retAddrSize,
                };
                return(ft);
            }
        }
Example #17
0
 public void VisitUnknownType(UnknownType ut)
 {
 }
Example #18
0
 public override object Visit(UnknownType that, object value = null)
 {
     _writer.Write("unknown");
     return null;
 }
Example #19
0
 public int VisitUnknownType(UnknownType ut)
 {
     throw new NotImplementedException();
 }
Example #20
0
 public void VisitUnknownType(UnknownType ut)
 {
 }
			public CountDownTimerAnonymousInnerClassHelper(CashDrawerFragment outerInstance, UnknownType MAX_VALUE) : base(MAX_VALUE, 1000)
			{
				this.outerInstance = outerInstance;
			}
 public AnalyzerWrapperAnonymousInnerClassHelper(AnalyzingInfixSuggester outerInstance, UnknownType PER_FIELD_REUSE_STRATEGY)
     : base(PER_FIELD_REUSE_STRATEGY)
 {
     this.outerInstance = outerInstance;
 }
Example #23
0
 public NGramTokenizerAnonymousInnerClassHelper(UnknownType TEST_VERSION_CURRENT, StringReader java, int minGram, int maxGram, bool edgesOnly, string nonTokenChars)
     : base(TEST_VERSION_CURRENT, StringReader, minGram, maxGram, edgesOnly)
 {
     this.nonTokenChars = nonTokenChars;
 }
Example #24
0
 public CodeFormatter VisitUnknownType(UnknownType ut)
 {
     throw new NotImplementedException();
 }
Example #25
0
			  public LetterTokenizerAnonymousInnerClassHelper2(AnalyzerAnonymousInnerClassHelper2 outerInstance, UnknownType TEST_VERSION_CURRENT, Reader reader) : base(TEST_VERSION_CURRENT, reader)
			  {
				  this.outerInstance = outerInstance;
			  }
		public void VisitUnknownType(UnknownType t)
		{
			sb.Append('?');
		}
Example #27
0
 public FieldSignatureAnonymousInnerClass2(string name, [email protected] type, UnknownType requireNonNull, [email protected] mapper) : base(name, type, requireNonNull, false)
 {
     this._mapper = mapper;
 }
Example #28
0
 public AbstractAssignerAnonymousInnerClass(Clock systemClock, UnknownType seconds, int availableProcessor) : base(systemClock, 10, seconds)
 {
     this._availableProcessor = availableProcessor;
 }
Example #29
0
 void Primary(Scope scope, out IExpression expr)
 {
     IType type = new UnknownType();
     string name = "";
     expr = null;
     IExpression rhs;
     if (la.kind == 1) {
         Get();
         name = t.val;
         if (la.kind == 7 || la.kind == 8) {
             if (la.kind == 7) {
                 Get();
                 TypeIdentifier(scope, out type);
                 VariableDeclaration vd = new VariableDeclaration(name, type);
                 MultiVariableDeclaration parmDecl = new MultiVariableDeclaration(new List<VariableDeclaration>(new VariableDeclaration[] {vd}), null);
                 FunctionReturnDefinition(scope, out expr, parmDecl);
             } else {
                 VariableDeclaration vd = new VariableDeclaration(name, type);
                 MultiVariableDeclaration parmDecl = new MultiVariableDeclaration(new List<VariableDeclaration>(new VariableDeclaration[] {vd}), null);
                 FunctionReturnDefinition(scope, out expr, parmDecl);
             }
         }
         if (StartOf(1)) {
             expr = expr ?? (IExpression)scope.GetDeclarationFor(name);
             Expression(scope, out rhs);
             expr = new FunctionCall(expr, rhs);
         }
         expr = expr ?? (IExpression)scope.GetDeclarationFor(name);
     } else if (la.kind == 13) {
         Get();
         VarList vl = new VarList();
         if (la.kind == 1 || la.kind == 3 || la.kind == 10) {
             StillPrimary(scope, out expr, vl);
         } else if (la.kind == 14) {
             Get();
         } else SynErr(27);
     } else SynErr(28);
 }
 public void VisitUnknownType(UnknownType t)
 {
     // Error
 }
Example #31
0
 public PlatformModuleAnonymousInnerClass(GraphDatabaseFacadeFactoryAnonymousInnerClass outerInstance, File storeDir, Config config, UnknownType databaseInfo, GraphDatabaseFacadeFactory.Dependencies dependencies) : base(storeDir, config, databaseInfo, dependencies)
 {
     this.outerInstance = outerInstance;
 }
Example #32
0
 void SingleVarNomination(ref Scope scope, out VariableDeclaration varDecl, bool decl)
 {
     IType type = new UnknownType();
     varDecl = null;
     Expect(1);
     string name = t.val;
     if (la.kind == 7) {
         Get();
         TypeIdentifier(scope, out type);
         varDecl = new VariableDeclaration(name, type);
         scope = new Scope(scope, varDecl);
     }
     varDecl = varDecl ?? VariableDeclaration.Find(ref scope, varDecl, name, decl);
 }
Example #33
0
 public Expression VisitUnknownType(UnknownType ut)
 {
     return(FallbackExpression());
 }
Example #34
0
 void StillPrimary(Scope scope, out IExpression expr, VarList vl)
 {
     IType type = new UnknownType();
     string name = "";
     expr = null;
     IExpression rhs;
     if (la.kind == 1) {
         Get();
         name = t.val;
         if (la.kind == 14) {
             Get();
             if (la.kind == 8) {
                 VariableDeclaration newestParam = new VariableDeclaration(name, type);
                 vl.Add(newestParam);
                 MultiVariableDeclaration parmDecl = new MultiVariableDeclaration(vl, null);
                 FunctionReturnDefinition(scope, out expr, parmDecl);
             }
             if (StartOf(1)) {
                 expr = expr ?? (IExpression)scope.GetDeclarationFor(name);
                 Expression(scope, out rhs);
                 expr = new FunctionCall(expr, rhs);
             }
             expr = expr ?? (IExpression)scope.GetDeclarationFor(name);
         } else if (la.kind == 7) {
             Get();
             TypeIdentifier(scope, out type);
             VariableDeclaration newestParam = new VariableDeclaration(name, type);
             vl.Add(newestParam);
             MultiVariableDeclaration parmDecl = new MultiVariableDeclaration(vl, null);
             if (la.kind == 8) {
                 FunctionReturnDefinition(scope, out expr, parmDecl);
                 if (la.kind == 14) {
                     Get();
                     if (StartOf(1)) {
                         Expression(scope, out rhs);
                         expr = new FunctionCall(expr, rhs);
                     }
                 } else if (StartOf(1)) {
                     Expression(scope, out rhs);
                     expr = new FunctionCall(expr, rhs);
                     if (la.kind == 14) {
                         Get();
                     } else if (la.kind == 11) {
                         ExpressionList el = new ExpressionList();
                         expr = expr ?? (IExpression)scope.GetDeclarationFor(name);
                         el.Add(expr);
                         Get();
                         Secondary(scope, el, out expr);
                     } else SynErr(29);
                 } else if (la.kind == 11) {
                     ExpressionList el = new ExpressionList();
                     expr = expr ?? (IExpression)scope.GetDeclarationFor(name);
                     el.Add(expr);
                     Get();
                     Secondary(scope, el, out expr);
                 } else SynErr(30);
             } else if (la.kind == 14) {
                 Get();
                 FunctionReturnDefinition(scope, out expr, parmDecl);
                 if (StartOf(1)) {
                     Expression(scope, out rhs);
                     expr = new FunctionCall(expr, rhs);
                 }
                 if (la.kind == 11) {
                     ExpressionList el = new ExpressionList();
                     expr = expr ?? (IExpression)scope.GetDeclarationFor(name);
                     el.Add(expr);
                     Get();
                     Secondary(scope, el, out expr);
                 }
             } else if (la.kind == 11) {
                 VariableDeclaration vd;
                 NextNomination(ref scope, out vd);
                 FunctionReturnDefinition(scope, out expr, parmDecl);
                 if (StartOf(1)) {
                     Expression(scope, out rhs);
                     expr = new FunctionCall(expr, rhs);
                 }
             } else SynErr(31);
         } else if (la.kind == 11) {
             Get();
             vl.Add(new VariableDeclaration(name, type));
             StillPrimary(scope, out expr, vl);
         } else if (la.kind == 8) {
             VariableDeclaration newestParam = new VariableDeclaration(name, type);
             vl.Add(newestParam);
             MultiVariableDeclaration parmDecl = new MultiVariableDeclaration(vl, null);
             FunctionReturnDefinition(scope, out expr, parmDecl);
             if (la.kind == 14) {
                 Get();
                 Expression(scope, out rhs);
                 expr = new FunctionCall(expr, rhs);
             } else if (StartOf(3)) {
                 if (la.kind == 11) {
                     Get();
                 }
                 ExpressionList el = new ExpressionList();
                 expr = expr ?? (IExpression)scope.GetDeclarationFor(name);
                 el.Add(expr);
                 Secondary(scope, el, out expr);
             } else SynErr(32);
         } else SynErr(33);
     } else if (la.kind == 3 || la.kind == 10) {
         if (la.kind == 3) {
             IntegerLiteral(scope, out expr);
         } else {
             ArrayLiteral(scope, out expr);
         }
         ExpressionList el = new ExpressionList();
         expr = expr ?? (IExpression)scope.GetDeclarationFor(name);
         el.Add(expr);
         if (la.kind == 11) {
             Get();
             Secondary(scope, el, out expr);
         }
     } else SynErr(34);
 }
Example #35
0
 public IEnumerable <WorkItem> VisitUnknownType(UnknownType ut)
 {
     throw new NotImplementedException();
 }
        public override object Visit(UnknownType that, object value = null)
        {
            PrintPrologue(that);
            _writer.WriteLine("TypeKind = {0}", that.TypeKind.ToString());
            PrintEpilogue(that);

            return null;
        }
Example #37
0
 public DocToIdIteratorAnonymousInnerClass(LuceneBatchInserterIndex outerInstance, IndexHits <Document> result, UnknownType emptyList, UnknownType empty, string key, object value) : base(result, emptyList, null, empty)
 {
     this.outerInstance = outerInstance;
     this._key          = key;
     this._value        = value;
     ids = new List <>();
 }
Example #38
0
 public void Unify_AreUnknownCompatible()
 {
     var t1 = new StructureType("FOO", 3);
     var t2 = new UnknownType();
     Assert.IsTrue(un.AreCompatible(t1, t2));
     Assert.AreEqual("(struct \"FOO\" 0003)", un.Unify(t1, t2).ToString());
 }
Example #39
0
 public Expression VisitUnknownType(UnknownType ut)
 {
     return(expComplex);
 }
			public FragmentPagerAdapterAnonymousInnerClassHelper(InfiniteViewPagerActivity outerInstance, UnknownType getSupportFragmentManager) : base(getSupportFragmentManager)
			{
				this.outerInstance = outerInstance;
				colours = new int[]{Color.CYAN, Color.GRAY, Color.MAGENTA, Color.LTGRAY, Color.GREEN, Color.WHITE, Color.YELLOW};
			}
Example #41
0
 public NestingResourceIteratorAnonymousInnerClass(OrderedByTypeExpander outerInstance, UnknownType iterator, Node node) : base(iterator)
 {
     this.outerInstance = outerInstance;
     this._node         = node;
 }
Example #42
0
 public void VisitUnknownType(UnknownType ut)
 {
     throw new NotImplementedException();
 }
Example #43
0
 public Configuration_OverriddenAnonymousInnerClass(CoarseBoundedProgressExecutionMonitorTest outerInstance, UnknownType @default) : base(@default)
 {
     this.outerInstance = outerInstance;
 }
Example #44
0
 public override object Visit(UnknownType that, object value = null)
 {
     return null;
 }
Example #45
0
 public DataType VisitUnknownType(UnknownType unk)
 {
     return(unk);
 }
Example #46
0
 public ThreadPoolExecutorAnonymousInnerClass(RejectingJobExecutor outerInstance, int corePoolSize, int maxPoolSize, UnknownType MILLISECONDS, BlockingQueue <ThreadStart> threadPoolQueue) : base(corePoolSize, maxPoolSize, 0L, MILLISECONDS, threadPoolQueue)
 {
     this.outerInstance = outerInstance;
 }
Example #47
0
 public Expression VisitUnknownType(UnknownType ut)
 {
     throw new NotImplementedException();
 }
Example #48
0
 public ListParameterExtractorAnonymousInnerClass3(Org.Neo4j.Server.plugins.TypeCaster caster, UnknownType getComponentType, Parameter parameter, Description description) : base(caster, getComponentType, parameter, description)
 {
 }
Example #49
0
 public SerializedType VisitUnknownType(UnknownType ut)
 {
     throw new NotImplementedException();
 }
Example #50
0
 public virtual object Visit(UnknownType that, object value)
 {
     throw new System.NotImplementedException();
 }