Beispiel #1
0
        internal object ExecuteExpression(ResourceSemantics semantics)
        {
            this.semantics = semantics;
            scanner.Next();

            return(Expression().Value);
        }
Beispiel #2
0
        //---------------------------------------------------------------
        #endregion
        //---------------------------------------------------------------

        //---------------------------------------------------------------
        #region Methods
        //---------------------------------------------------------------
        /// <summary>
        /// execute the script
        /// </summary>
        /// <returns>The variables, that were created during the execution of the script.</returns>
        public override Variables Execute()
        {
            ResourceSemantics semantics = new ResourceSemantics(this.Scanner);

            ((IResourceParser)this).Execute(semantics);
            return(semantics.GetVariables());
        }
Beispiel #3
0
        void IResourceParser.Execute(ResourceSemantics semantics)
        {
            // EBNF: Start = Expression
            this.semantics = semantics;
            scanner.Next();

            Block();

            if (scanner.TokenType != TokenType.EndOfScript)
            {
                throw new ParserException(scanner.FileName, scanner.Line, scanner.Column, "End of script wasn't reached!");
            }
        }
Beispiel #4
0
 internal void ExecuteSetIdents(ResourceSemantics semantics, out ParserValue obj, out string varName, out ParserValue indexer)
 {
     this.semantics = semantics;
     scanner.Next();
     SetIdents(out obj, out varName, out indexer);
 }