Beispiel #1
0
        private void FireEOFError()
        {
            TerminalToken eofToken =
                new TerminalToken(SymbolCollection.EOF, SymbolCollection.EOF.Name, tokenizer.GetCurrentLocation());

            FireParseError(eofToken);
        }
Beispiel #2
0
        private TerminalToken SkipAfterCommentEnd()
        {
            int           commentDepth = 1;
            TerminalToken token        = null;

            while (commentDepth > 0)
            {
                token = tokenizer.RetrieveToken();
                if (token.Symbol is SymbolCommentEnd)
                {
                    commentDepth--;
                }
                else if (token.Symbol is SymbolCommentStart)
                {
                    commentDepth++;
                }
                else if (token.Symbol is SymbolEnd)
                {
                    FireEOFError();
                    break;
                }
            }
            if (commentDepth == 0)
            {
                return(token);
            }
            else
            {
                return(null);
            }
        }
Beispiel #3
0
 private bool ProcessCommentStart(TerminalToken token)
 {
     if (OnCommentRead == null)
     {
         return(SkipAfterCommentEnd() != null);
     }
     else
     {
         Location      start      = this.tokenizer.GetCurrentLocation();
         TerminalToken commentEnd = SkipAfterCommentEnd();
         bool          result     = commentEnd != null;
         if (result)
         {
             Location             end     = this.tokenizer.GetCurrentLocation();
             string               str     = this.tokenizer.GetInput();
             int                  len     = end.Position - start.Position;
             string               comment = str.Substring(start.Position, len - commentEnd.Text.Length);
             CommentReadEventArgs args    = new CommentReadEventArgs(token.Text + comment,
                                                                     comment,
                                                                     false);
             OnCommentRead(this, args);
         }
         return(result);
     }
 }
Beispiel #4
0
 public ParseErrorEventArgs(TerminalToken unexpectedToken, SymbolCollection expectedTokens)
 {
     this.unexpectedToken = unexpectedToken;
     this.expectedTokens  = expectedTokens;
     contin    = ContinueMode.Stop;
     nextToken = null;
 }
Beispiel #5
0
        private TerminalToken GetLookahead()
        {
            if (lookahead != null)
            {
                return(lookahead);
            }
            do
            {
                TerminalToken token = tokenizer.RetrieveToken();
                if (token.Symbol is SymbolCommentLine)
                {
                    if (!ProcessCommentLine(token))
                    {
                        continueParsing = false;
                    }
                }
                else if (token.Symbol is SymbolCommentStart)
                {
                    if (!ProcessCommentStart(token))
                    {
                        continueParsing = false;
                    }
                }
                else if (token.Symbol is SymbolWhiteSpace)
                {
                    if (!ProcessWhiteSpace(token))
                    {
                        continueParsing = false;
                    }
                }
                else if (token.Symbol is SymbolError)
                {
                    if (!ProcessError(token))
                    {
                        continueParsing = false;
                    }
                }
                else
                {
                    lookahead = token;
                }
                if (!continueParsing)
                {
                    break;
                }
            } while (lookahead == null);

            if ((lookahead != null) && (OnTokenRead != null))
            {
                TokenReadEventArgs args = new TokenReadEventArgs(lookahead);
                OnTokenRead(this, args);
                if (args.Continue == false)
                {
                    continueParsing = false;
                    lookahead       = null;
                }
            }
            return(lookahead);
        }
Beispiel #6
0
		private void DoShift(TerminalToken token, ShiftAction action)
		{
			stateStack.Push(action.State);
			tokenStack.Push(token);
			lookahead = null;
			if (OnShift != null)
				OnShift(this,new ShiftEventArgs(token,action.State));
		}
Beispiel #7
0
 private void Reset()
 {
     stateStack = new StateStack();
     stateStack.Push(startState);
     tokenStack      = new TokenStack();
     lookahead       = null;
     continueParsing = true;
     accepted        = false;
 }
Beispiel #8
0
 public void ShowInputError(TerminalToken token)
 {
     ClearShowInputError();
     int oldpos = this.inputBox.SelectionStart;
     this.inputBox.Select(token.Location.Position, token.Text.Length);
     this.inputBox.SelectionColor = Color.Red;
     this.inputBox.Select(oldpos,0);
     this.inputBox.SelectionColor = Color.ForestGreen;
 }
Beispiel #9
0
		private void Reset()
		{
			stateStack = new StateStack();
			stateStack.Push(startState);
			tokenStack = new TokenStack();
			lookahead = null;
			continueParsing = true;
			accepted = false;
		}
Beispiel #10
0
 private void DoShift(TerminalToken token, ShiftAction action)
 {
     stateStack.Push(action.State);
     tokenStack.Push(token);
     lookahead = null;
     if (OnShift != null)
     {
         OnShift(this, new ShiftEventArgs(token, action.State));
     }
 }
Beispiel #11
0
 private bool ProcessError(TerminalToken token)
 {
     if (OnTokenError != null)
     {
         TokenErrorEventArgs e = new TokenErrorEventArgs(token);
         OnTokenError(this, e);
         return(e.Continue);
     }
     else
     {
         return(false);
     }
 }
Beispiel #12
0
 private void FireParseError(TerminalToken token)
 {
     if (OnParseError != null)
     {
         ParseErrorEventArgs e = new ParseErrorEventArgs(token, FindExpectedTokens());
         OnParseError(this, e);
         continueParsing = e.Continue != ContinueMode.Stop;
         lookahead       = e.NextToken;
         if ((e.NextToken != null) && (e.Continue == ContinueMode.Insert))
         {
             tokenizer.SetCurrentLocation(token.Location);
         }
     }
 }
Beispiel #13
0
        private bool ProcessCommentLine(TerminalToken token)
        {
            Location start  = tokenizer.GetCurrentLocation();
            bool     result = SkipToEndOfLine();

            if (result)
            {
                Location end     = tokenizer.GetCurrentLocation();
                string   str     = tokenizer.GetInput();
                int      len     = end.Position - start.Position;
                string   comment = str.Substring(start.Position, len);
                token.UserObject = comment;
                if (OnCommentRead != null)
                {
                    CommentReadEventArgs args = new CommentReadEventArgs(token.Text, comment, true);
                    OnCommentRead(this, args);
                }
            }
            return(result);
        }
        /// <summary>
        /// Parse the input with tokens and rules.
        /// </summary>
        /// <param name="input">The source input</param>
        /// <returns>The nonterminal token that the input has been reduced to.
        /// Null if the parse has failed.</returns>
        public NonterminalToken Parse(String input)
        {
            Reset();
            tokenizer.SetInput(input);

            while (continueParsing)
            {
                TerminalToken token = GetLookahead();
                if (token != null)
                {
                    ParseTerminal(token);
                }
            }
            if (accepted)
            {
                return((NonterminalToken)tokenStack.Pop());
            }
            else
            {
                return(null);
            }
        }
Beispiel #15
0
        private Object CreateObject(TerminalToken token)
        {
            switch (token.Symbol.Id)
            {
            case (int)SymbolConstants.SYMBOL_EOF:
                return(null);

            case (int)SymbolConstants.SYMBOL_WHITESPACE:
                return(null);

            case (int)SymbolConstants.SYMBOL_MINUS:
                return(null);

            case (int)SymbolConstants.SYMBOL_LPARAN:
                return(null);

            case (int)SymbolConstants.SYMBOL_RPARAN:
                return(null);

            case (int)SymbolConstants.SYMBOL_TIMES:
                return(null);

            case (int)SymbolConstants.SYMBOL_DIV:
                return(null);

            case (int)SymbolConstants.SYMBOL_PLUS:
                return(null);

            case (int)SymbolConstants.SYMBOL_FLOAT:
                return(ValueFactory.CreateValue(Double.Parse(token.Text,
                                                             numberFormatInfo)));

            case (int)SymbolConstants.SYMBOL_INTEGER:
                return(ValueFactory.CreateValue(Int32.Parse(token.Text)));
            }
            throw new SymbolException("Unknown symbol");
        }
 private bool ProcessCommentLine(TerminalToken token)
 {
     if (OnCommentRead == null)
     {
         tokenizer.SkipToChar('\n');
         //SkipToEndOfLine();
         return(true);
     }
     else
     {
         Location start = this.tokenizer.GetCurrentLocation();
         tokenizer.SkipToChar('\n');
         //SkipToEndOfLine();
         Location             end     = this.tokenizer.GetCurrentLocation();
         string               str     = this.tokenizer.GetInput();
         int                  len     = end.Position - start.Position;
         string               comment = str.Substring(start.Position, len);
         CommentReadEventArgs args    = new CommentReadEventArgs(token.Text + comment,
                                                                 comment,
                                                                 true);
         OnCommentRead(this, args);
         return(true);
     }
 }
Beispiel #17
0
        private void ParseTerminal(TerminalToken token)
        {
            State currentState = stateStack.Peek();

            lalr.Action action = currentState.Actions.Get(token.Symbol);

            if (action is ShiftAction)
            {
                DoShift(token, (ShiftAction)action);
            }
            else if (action is ReduceAction)
            {
                DoReduce(token, (ReduceAction)action);
            }
            else if (action is AcceptAction)
            {
                DoAccept(token, (AcceptAction)action);
            }
            else
            {
                continueParsing = false;
                FireParseError(token);
            }
        }
Beispiel #18
0
        private Object CreateObject(TerminalToken token)
        {
            switch (token.Symbol.Id)
            {
            case (int)SymbolConstants.SYMBOL_EOF:
                //(EOF)
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ERROR:
                //(Error)
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_WHITESPACE:
                //Whitespace
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_MINUS:
                //'-'
                //todo: Create a new object that corresponds to the symbol
                return(token.Text);

            case (int)SymbolConstants.SYMBOL_LPAREN:
                //'('
                //todo: Create a new object that corresponds to the symbol
                return(token.Text);

            case (int)SymbolConstants.SYMBOL_RPAREN:
                //')'
                //todo: Create a new object that corresponds to the symbol
                return(token.Text);

            case (int)SymbolConstants.SYMBOL_TIMES:
                //'*'
                //todo: Create a new object that corresponds to the symbol
                return(token.Text);

            case (int)SymbolConstants.SYMBOL_DIV:
                //'/'
                //todo: Create a new object that corresponds to the symbol
                return(token.Text);

            case (int)SymbolConstants.SYMBOL_CARET:
                //'^'
                //todo: Create a new object that corresponds to the symbol
                return(token.Text);

            case (int)SymbolConstants.SYMBOL_PLUS:
                //'+'
                //todo: Create a new object that corresponds to the symbol
                return(token.Text);

            case (int)SymbolConstants.SYMBOL_NUMERO:
                //Numero
                //todo: Create a new object that corresponds to the symbol
                return(token.Text);

            case (int)SymbolConstants.SYMBOL_REAL:
                //Real
                //todo: Create a new object that corresponds to the symbol
                return(token.Text);

            case (int)SymbolConstants.SYMBOL_E:
                //<E>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_F:
                //<F>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_K:
                //<K>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_T:
                //<T>
                //todo: Create a new object that corresponds to the symbol
                return(null);
            }
            throw new SymbolException("Unknown symbol");
        }
Beispiel #19
0
		private void FireEOFError()
		{
			TerminalToken eofToken = new TerminalToken(SymbolCollection.EOF,
				SymbolCollection.EOF.Name,
				tokenizer.GetCurrentLocation());
			FireParseError(eofToken);
		}
		/// <summary>
		/// <para>Symbol: WndParam List</para>
		/// <para><c>&lt;WndParam List&gt;</c></para>
		/// </summary>
		protected virtual object TerminalWndparamlist(TerminalToken token)
		{
			throw new NotImplementedException("Symbol WndParam List");
		}
		/// <summary>
		/// <para>Symbol: TreeView Columns</para>
		/// <para><c>&lt;TreeView Columns&gt;</c></para>
		/// </summary>
		protected virtual object TerminalTreeviewcolumns(TerminalToken token)
		{
			throw new NotImplementedException("Symbol TreeView Columns");
		}
Beispiel #22
0
		private void ParseTerminal(TerminalToken token)
		{
			State currentState = stateStack.Peek();

			Action action = currentState.Actions.Get(token.Symbol);

			if (action is ShiftAction)
				DoShift(token,(ShiftAction)action);
			else if (action is ReduceAction)
				DoReduce(token,(ReduceAction)action);
			else if (action is AcceptAction)
				DoAccept(token,(AcceptAction)action);
			else
			{
				continueParsing = false;
				FireParseError(token);
			}
		}
 private Object CreateObject(TerminalToken token)
 {
     return null;
 }
		/// <summary>
		/// <para>Symbol: TryFinally</para>
		/// <para><c>&lt;TryFinally&gt;</c></para>
		/// </summary>
		protected virtual object TerminalTryfinally(TerminalToken token)
		{
			throw new NotImplementedException("Symbol TryFinally");
		}
Beispiel #25
0
 private void FireParseError(TerminalToken token)
 {
     if (OnParseError != null)
     {
         ParseErrorEventArgs e =
             new ParseErrorEventArgs(token, FindExpectedTokens());
         OnParseError(this, e);
         continueParsing = e.Continue != ContinueMode.Stop;
         lookahead = e.NextToken;
         if ((e.NextToken != null) && (e.Continue == ContinueMode.Insert))
             tokenizer.SetCurrentLocation(token.Location);
     }
 }
Beispiel #26
0
 private bool ProcessCommentLine(TerminalToken token)
 {
     if (OnCommentRead == null)
     {
         tokenizer.SkipToChar('\n');
         //SkipToEndOfLine();
         return true;
     }
     else
     {
         Location start = this.tokenizer.GetCurrentLocation();
         tokenizer.SkipToChar('\n');
         //SkipToEndOfLine();
         Location end = this.tokenizer.GetCurrentLocation();
         string str = this.tokenizer.GetInput();
         int len = end.Position - start.Position;
         string comment = str.Substring(start.Position, len);
         CommentReadEventArgs args = new CommentReadEventArgs(token.Text + comment,
                                                              comment,
                                                              true);
         OnCommentRead(this, args);
         return true;
     }
 }
Beispiel #27
0
        private Object CreateObject(TerminalToken token)
        {
            switch (token.Symbol.Id)
            {
            case (int)SymbolConstants.SYMBOL_EOF:
                //(EOF)
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ERROR:
                //(Error)
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_WHITESPACE:
                //Whitespace
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_MINUS:
                //'-'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LPAREN:
                //'('
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_RPAREN:
                //')'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_COMMA:
                //','
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_COLON:
                //':'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_COLONEQ:
                //':='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SEMI:
                //';'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL__DIGITS:
                //'_Digits'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL__ID:
                //'_Id'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL__LETTER:
                //'_Letter'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL__QUOTE:
                //'_Quote'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL__SPACE:
                //'_Space'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PIPEPIPE:
                //'||'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PLUS:
                //'+'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_BEGIN:
                //begin
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DECLARE:
                //declare
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DO:
                //do
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ELSE:
                //else
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_END:
                //end
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FI:
                //fi
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FOR:
                //for
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_IF:
                //if
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_NATURAL:
                //natural
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_OD:
                //od
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_STRING:
                //string
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_THEN:
                //then
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_WHILE:
                //while
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ANYMINUSCHARMINUSBUTMINUSQUOTE:
                //<any-char-but-quote>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ASSIGN:
                //<assign>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CONC:
                //<conc>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DECLS:
                //<decls>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DIGITS:
                //<digits>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EMPTY:
                //<empty>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EXP:
                //<exp>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FOR2:
                //<for>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FORMINUSHEAD:
                //<for-head>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ID:
                //<id>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_IDMINUSTYPEMINUSLIST:
                //<id-type-list>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_IF2:
                //<if>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_IFMINUSCOMPACT:
                //<if-compact>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LAYOUT:
                //<layout>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LETTER:
                //<letter>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LITERAL:
                //<literal>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_MINUS2:
                //<minus>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_NATURALMINUSCONSTANT:
                //<natural-constant>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PICOMINUSPROGRAM:
                //<pico-program>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PLUS2:
                //<plus>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PRIMARY:
                //<primary>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_QUOTE:
                //<quote>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SERIES:
                //<series>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SPACE:
                //<space>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_STAT:
                //<stat>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_STRINGMINUSCONSTANT:
                //<string-constant>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_STRINGMINUSTAIL:
                //<string-tail>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TYPE:
                //<type>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_WHILE2:
                //<while>
                //todo: Create a new object that corresponds to the symbol
                return(null);
            }
            throw new SymbolException("Unknown symbol");
        }
Beispiel #28
0
        protected override Object CreateObject(TerminalToken token)
        {
            switch (token.Symbol.Id)
               {

               case (int)com.calitha.goldparser.SymbolConstants.SYMBOL_IDENTIFIER:
                   return token.Text;
               case (int)SymbolConstants.SYMBOL_IP:
                   return token.Text;
               case (int)SymbolConstants.SYMBOL_NUMBER:
                   return token.Text;
               case (int)SymbolConstants.SYMBOL_FLOAT:
                   return token.Text;
               case (int)SymbolConstants.SYMBOL_DEVICEID:
                   return token.Text;

               case (int)SymbolConstants.SYMBOL_CMD:
                   return token.Text;
               case (int)SymbolConstants.SYMBOL_SUBCMD:
                   return token.Text;
               case (int)SymbolConstants.SYMBOL_STRINGLITERAL:
                   return token.Text;
               case (int)SymbolConstants.SYMBOL_CMDCLASS:
                   if (!(token.Text == "A" || token.Text == "B" || token.Text == "C" || token.Text == "D" || token.Text == "N"))
                     throw new SymbolException(token.Location+", must be 'A' or 'B' or 'C' or 'D' or 'N'==>"+token.Text);
                   return token.Text;
               case (int)SymbolConstants.SYMBOL_CMDTYPE:
                   if (!(token.Text == "Set" || token.Text == "Query" || token.Text == "Report" ))
                       throw new SymbolException(token.Location + ", must be 'Set' or 'Query' or 'Report' ==>" + token.Text);
                   return token.Text;
               //case (int)SymbolConstants.SYMBOL_LVALUE:
               //    return token.Text;

               //case (int)SymbolConstants.SYMBOL_HVALUE:
               //    return Convert.ToInt32(token.Text);
               //case (int) SymbolConstants.SYMBOL_BYTES:
                   //return token.Text;

                 //  break;

               }
               return null;
        }
Beispiel #29
0
        private Object CreateObjectFromTerminal(TerminalToken token)
        {
            switch (token.Symbol.Id)
            {
            case (int)SymbolConstants.SYMBOL_EOF:
                //(EOF)
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ERROR:
                //(Error)
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_WHITESPACE:
                //Whitespace
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_MINUS:
                //'-'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_MINUSMINUS:
                //'--'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EXCLAMEQ:
                //'!='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PERCENT:
                //'%'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LPAREN:
                //'('
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_RPAREN:
                //')'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TIMES:
                //'*'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_COMMA:
                //','
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DOT:
                //'.'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DIV:
                //'/'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_COLON:
                //':'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_COLONT:
                //':t'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SEMI:
                //';'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LBRACE:
                //'{'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LBRACERBRACE:
                //'{}'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_RBRACE:
                //'}'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PLUS:
                //'+'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PLUSPLUS:
                //'++'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LT:
                //'<'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LTEQ:
                //'<='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EQ:
                //'='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EQEQ:
                //'=='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_GT:
                //'>'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_GTEQ:
                //'>='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_GTGT:
                //'>>'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CHAR:
                //char
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CLASS:
                //Class
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DECIMAL:
                //decimal
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DO:
                //do
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ELSE:
                //else
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FOR:
                //for
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FUNCTION:
                //function
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ID:
                //id
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_IF:
                //if
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_INTEGER:
                //integer
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_NUMBER:
                //number
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PRIVATE:
                //Private
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PROTECTED:
                //Protected
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PUBLIC:
                //Public
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_REAL:
                //real
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_STATIC:
                //static
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_STRING:
                //String
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_VOID:
                //void
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_WHILE:
                //while
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ARGUMENTS:
                //<arguments>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ASSIGN:
                //<assign>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CLASSMINUSMEMBER:
                //<class-member>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CLASSMINUSMEMBERMINUSMETHOD:
                //<class-member-method>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CLASSMINUSMEMBERMINUSTYPE:
                //<class-member-type>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CLASSMINUSSTATEMENT:
                //<class-statement>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CLASSMINUSSTMTMINUSLIST:
                //<class-stmt-list>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CONDITION:
                //<condition>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_COUNTER:
                //<counter>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EXPRESSION:
                //<expression>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FACTOR:
                //<factor>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FORMINUSSTATEMENT:
                //<for-statement>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FUNCTIONMINUSCALL:
                //<function-call>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FUNCTIONMINUSSTATEMENT:
                //<function-statement>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FUNCTIONMINUSSTMT:
                //<function-stmt>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FUNCTIONMINUSSTMTMINUSLIST:
                //<function-stmt-list>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_IFMINUSSTATEMENT:
                //<if-statement>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_INITIALMINUSLIST:
                //<initial-list>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_OPERATION:
                //<operation>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PROGRAM:
                //<program>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_RETURNMINUSVALUE:
                //<return-value>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_STATEMENT:
                //<statement>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_STATEMENTS:
                //<statements>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TERM:
                //<term>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TYPES:
                //<types>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_WHILEMINUSSTATEMENT:
                //<While-statement>
                //todo: Create a new object that corresponds to the symbol
                return(null);
            }
            throw new SymbolException("Unknown symbol");
        }
Beispiel #30
0
        private Object CreateObject(TerminalToken token)
        {
            switch (token.Symbol.Id)
            {
                case (int)SymbolConstants.SYMBOL_EOF :
                //(EOF)
                return null;

                case (int)SymbolConstants.SYMBOL_ERROR :
                //(Error)
                return null;

                case (int)SymbolConstants.SYMBOL_WHITESPACE :
                //(Whitespace)
                return null;

                case (int)SymbolConstants.SYMBOL_COMMENTLINE :
                //(Comment Line)
                return null;

                case (int)SymbolConstants.SYMBOL_MINUS :
                //'-'
                return null;

                case (int)SymbolConstants.SYMBOL_LPARAN :
                //'('
                return null;

                case (int)SymbolConstants.SYMBOL_RPARAN :
                //')'
                return null;

                case (int)SymbolConstants.SYMBOL_TIMES :
                //'*'
                return null;

                case (int)SymbolConstants.SYMBOL_COLONCOLONEQ :
                //'::='
                return null;

                case (int)SymbolConstants.SYMBOL_QUESTION :
                //'?'
                return null;

                case (int)SymbolConstants.SYMBOL_PIPE :
                //'|'
                return null;

                case (int)SymbolConstants.SYMBOL_PLUS :
                //'+'
                return null;

                case (int)SymbolConstants.SYMBOL_EQ :
                //'='
                return null;

                case (int)SymbolConstants.SYMBOL_LARGECOMMENT :
                //LargeComment
                return token.Text;

                case (int)SymbolConstants.SYMBOL_NEWLINE :
                //Newline
                return null;

                case (int)SymbolConstants.SYMBOL_NONTERMINAL :
                //Nonterminal
                return token.Text;

                case (int)SymbolConstants.SYMBOL_PARAMETERNAME :
                //ParameterName
                return null;

                case (int)SymbolConstants.SYMBOL_SETLITERAL :
                //SetLiteral
                return null;

                case (int)SymbolConstants.SYMBOL_SETNAME :
                //SetName
                return null;

                case (int)SymbolConstants.SYMBOL_TERMINAL :
                //Terminal
                return token.Text;

                case (int)SymbolConstants.SYMBOL_CONTENT :
                //<Content>
                return null;

                case (int)SymbolConstants.SYMBOL_DEFINITION :
                //<Definition>
                return null;

                case (int)SymbolConstants.SYMBOL_GRAMMAR :
                //<Grammar>
                return null;

                case (int)SymbolConstants.SYMBOL_HANDLE :
                //<Handle>
                return null;

                case (int)SymbolConstants.SYMBOL_HANDLES :
                //<Handles>
                return null;

                case (int)SymbolConstants.SYMBOL_KLEENEOPT :
                //<Kleene Opt>
                return null;

                case (int)SymbolConstants.SYMBOL_LARGE_COMMENT :
                //<Large_Comment>
                return null;

                case (int)SymbolConstants.SYMBOL_NL :
                //<nl>
                return null;

                case (int)SymbolConstants.SYMBOL_NLOPT :
                //<nl opt>
                return null;

                case (int)SymbolConstants.SYMBOL_PARAMETER :
                //<Parameter>
                return null;

                case (int)SymbolConstants.SYMBOL_PARAMETERBODY :
                //<Parameter Body>
                return null;

                case (int)SymbolConstants.SYMBOL_PARAMETERITEM :
                //<Parameter Item>
                return null;

                case (int)SymbolConstants.SYMBOL_PARAMETERITEMS :
                //<Parameter Items>
                return null;

                case (int)SymbolConstants.SYMBOL_REGEXP :
                //<Reg Exp>
                return null;

                case (int)SymbolConstants.SYMBOL_REGEXP2 :
                //<Reg Exp 2>
                return null;

                case (int)SymbolConstants.SYMBOL_REGEXPITEM :
                //<Reg Exp Item>
                return null;

                case (int)SymbolConstants.SYMBOL_REGEXPSEQ :
                //<Reg Exp Seq>
                return null;

                case (int)SymbolConstants.SYMBOL_RULEDECL :
                //<Rule Decl>
                return null;

                case (int)SymbolConstants.SYMBOL_SETDECL :
                //<Set Decl>
                return null;

                case (int)SymbolConstants.SYMBOL_SETEXP :
                //<Set Exp>
                return null;

                case (int)SymbolConstants.SYMBOL_SETITEM :
                //<Set Item>
                return null;

                case (int)SymbolConstants.SYMBOL_SYMBOL :
                //<Symbol>
                return null;

                case (int)SymbolConstants.SYMBOL_TERMINALDECL :
                //<Terminal Decl>
                return null;

                case (int)SymbolConstants.SYMBOL_TERMINALNAME :
                //<Terminal Name>
                return null;

            }
            throw new SymbolException("Unknown symbol");
        }
        public virtual object CreateObjectFromTerminal(TerminalToken token)
        {
            switch (token.Symbol.Id)
            {
                case (int)Symbols.Eof: //(EOF)
                	return TerminalEof(token);

                case (int)Symbols.Error: //(Error)
                	return TerminalError(token);

                case (int)Symbols.Whitespace: //(Whitespace)
                	return TerminalWhitespace(token);

                case (int)Symbols.Commentend: //(Comment End)
                	return TerminalCommentend(token);

                case (int)Symbols.Commentline: //(Comment Line)
                	return TerminalCommentline(token);

                case (int)Symbols.Commentstart: //(Comment Start)
                	return TerminalCommentstart(token);

                case (int)Symbols.Minus: //'-'
                	return TerminalMinus(token);

                case (int)Symbols.Minusminus: //--
                	return TerminalMinusminus(token);

                case (int)Symbols.Comma: //','
                	return TerminalComma(token);

                case (int)Symbols.Semi: //';'
                	return TerminalSemi(token);

                case (int)Symbols.Colon: //':'
                	return TerminalColon(token);

                case (int)Symbols.Exclam: //'!'
                	return TerminalExclam(token);

                case (int)Symbols.Exclameq: //'!='
                	return TerminalExclameq(token);

                case (int)Symbols.Question: //'?'
                	return TerminalQuestion(token);

                case (int)Symbols.Dot: //'.'
                	return TerminalDot(token);

                case (int)Symbols.Lparan: //'('
                	return TerminalLparan(token);

                case (int)Symbols.Rparan: //')'
                	return TerminalRparan(token);

                case (int)Symbols.Lbracket: //'['
                	return TerminalLbracket(token);

                case (int)Symbols.Rbracket: //']'
                	return TerminalRbracket(token);

                case (int)Symbols.Lbrace: //'{'
                	return TerminalLbrace(token);

                case (int)Symbols.Rbrace: //'}'
                	return TerminalRbrace(token);

                case (int)Symbols.Times: //'*'
                	return TerminalTimes(token);

                case (int)Symbols.Timeseq: //'*='
                	return TerminalTimeseq(token);

                case (int)Symbols.Div: //'/'
                	return TerminalDiv(token);

                case (int)Symbols.Diveq: //'/='
                	return TerminalDiveq(token);

                case (int)Symbols.Percent: //'%'
                	return TerminalPercent(token);

                case (int)Symbols.Plus: //'+'
                	return TerminalPlus(token);

                case (int)Symbols.Plusplus: //'++'
                	return TerminalPlusplus(token);

                case (int)Symbols.Pluseq: //'+='
                	return TerminalPluseq(token);

                case (int)Symbols.Lt: //'<'
                	return TerminalLt(token);

                case (int)Symbols.Lteq: //'<='
                	return TerminalLteq(token);

                case (int)Symbols.Lteqeq: //'<=='
                	return TerminalLteqeq(token);

                case (int)Symbols.Lteqeqgt: //'<==>'
                	return TerminalLteqeqgt(token);

                case (int)Symbols.Eq: //'='
                	return TerminalEq(token);

                case (int)Symbols.Minuseq: //'-='
                	return TerminalMinuseq(token);

                case (int)Symbols.Eqeq: //'=='
                	return TerminalEqeq(token);

                case (int)Symbols.Gt: //'>'
                	return TerminalGt(token);

                case (int)Symbols.Minusgt: //'->'
                	return TerminalMinusgt(token);

                case (int)Symbols.Gteq: //'>='
                	return TerminalGteq(token);

                case (int)Symbols.After: //after
                	return TerminalAfter(token);

                case (int)Symbols.Align: //align
                	return TerminalAlign(token);

                case (int)Symbols.And: //and
                	return TerminalAnd(token);

                case (int)Symbols.As: //as
                	return TerminalAs(token);

                case (int)Symbols.Before: //before
                	return TerminalBefore(token);

                case (int)Symbols.Bool: //bool
                	return TerminalBool(token);

                case (int)Symbols.Booleanliteral: //BooleanLiteral
                	return TerminalBooleanliteral(token);

                case (int)Symbols.Break: //break
                	return TerminalBreak(token);

                case (int)Symbols.Button: //button
                	return TerminalButton(token);

                case (int)Symbols.Case: //case
                	return TerminalCase(token);

                case (int)Symbols.Cast: //cast
                	return TerminalCast(token);

                case (int)Symbols.Catch: //catch
                	return TerminalCatch(token);

                case (int)Symbols.Column: //column
                	return TerminalColumn(token);

                case (int)Symbols.Continue: //continue
                	return TerminalContinue(token);

                case (int)Symbols.Database: //database
                	return TerminalDatabase(token);

                case (int)Symbols.Date: //date
                	return TerminalDate(token);

                case (int)Symbols.Daterange: //daterange
                	return TerminalDaterange(token);

                case (int)Symbols.Datetime: //datetime
                	return TerminalDatetime(token);

                case (int)Symbols.Datetimeliteral: //DateTimeLiteral
                	return TerminalDatetimeliteral(token);

                case (int)Symbols.Datetimerange: //datetimerange
                	return TerminalDatetimerange(token);

                case (int)Symbols.Decimal: //decimal
                	return TerminalDecimal(token);

                case (int)Symbols.Decimalliteral: //DecimalLiteral
                	return TerminalDecimalliteral(token);

                case (int)Symbols.Default: //default
                	return TerminalDefault(token);

                case (int)Symbols.Delete: //delete
                	return TerminalDelete(token);

                case (int)Symbols.Dict: //dict
                	return TerminalDict(token);

                case (int)Symbols.Do: //do
                	return TerminalDo(token);

                case (int)Symbols.Else: //else
                	return TerminalElse(token);

                case (int)Symbols.End: //end
                	return TerminalEnd(token);

                case (int)Symbols.Extends: //extends
                	return TerminalExtends(token);

                case (int)Symbols.Finally: //finally
                	return TerminalFinally(token);

                case (int)Symbols.For: //for
                	return TerminalFor(token);

                case (int)Symbols.Foreach: //foreach
                	return TerminalForeach(token);

                case (int)Symbols.Foreign: //foreign
                	return TerminalForeign(token);

                case (int)Symbols.Function: //function
                	return TerminalFunction(token);

                case (int)Symbols.Get: //get
                	return TerminalGet(token);

                case (int)Symbols.Hbox: //hbox
                	return TerminalHbox(token);

                case (int)Symbols.Hbuttonbox: //hbuttonbox
                	return TerminalHbuttonbox(token);

                case (int)Symbols.Hpaned: //hpaned
                	return TerminalHpaned(token);

                case (int)Symbols.Id: //ID
                	return TerminalId(token);

                case (int)Symbols.If: //if
                	return TerminalIf(token);

                case (int)Symbols.Image: //image
                	return TerminalImage(token);

                case (int)Symbols.In: //in
                	return TerminalIn(token);

                case (int)Symbols.Index: //index
                	return TerminalIndex(token);

                case (int)Symbols.Insert: //insert
                	return TerminalInsert(token);

                case (int)Symbols.Integer: //integer
                	return TerminalInteger(token);

                case (int)Symbols.Intliteral: //IntLiteral
                	return TerminalIntliteral(token);

                case (int)Symbols.Is: //is
                	return TerminalIs(token);

                case (int)Symbols.Item: //item
                	return TerminalItem(token);

                case (int)Symbols.List: //list
                	return TerminalList(token);

                case (int)Symbols.Liststore: //liststore
                	return TerminalListstore(token);

                case (int)Symbols.Many: //many
                	return TerminalMany(token);

                case (int)Symbols.Menu: //menu
                	return TerminalMenu(token);

                case (int)Symbols.Menuitem: //menuitem
                	return TerminalMenuitem(token);

                case (int)Symbols.Modified: //modified
                	return TerminalModified(token);

                case (int)Symbols.New: //new
                	return TerminalNew(token);

                case (int)Symbols.Not: //not
                	return TerminalNot(token);

                case (int)Symbols.Null: //null
                	return TerminalNull(token);

                case (int)Symbols.Observed: //observed
                	return TerminalObserved(token);

                case (int)Symbols.Or: //or
                	return TerminalOr(token);

                case (int)Symbols.Position: //position
                	return TerminalPosition(token);

                case (int)Symbols.Primary: //primary
                	return TerminalPrimary(token);

                case (int)Symbols.Property: //property
                	return TerminalProperty(token);

                case (int)Symbols.Range: //range
                	return TerminalRange(token);

                case (int)Symbols.Return: //return
                	return TerminalReturn(token);

                case (int)Symbols.Scrolled: //scrolled
                	return TerminalScrolled(token);

                case (int)Symbols.Select: //select
                	return TerminalSelect(token);

                case (int)Symbols.Separator: //Separator
                	return TerminalSeparator(token);

                case (int)Symbols.Set: //set
                	return TerminalSet(token);

                case (int)Symbols.Static: //static
                	return TerminalStatic(token);

                case (int)Symbols.Stringliteral: //StringLiteral
                	return TerminalStringliteral(token);

                case (int)Symbols.Switch: //switch
                	return TerminalSwitch(token);

                case (int)Symbols.Table: //table
                	return TerminalTable(token);

                case (int)Symbols.Template: //template
                	return TerminalTemplate(token);

                case (int)Symbols.Through: //through
                	return TerminalThrough(token);

                case (int)Symbols.Throw: //throw
                	return TerminalThrow(token);

                case (int)Symbols.Time: //time
                	return TerminalTime(token);

                case (int)Symbols.Timerange: //timerange
                	return TerminalTimerange(token);

                case (int)Symbols.Timespanliteral: //TimeSpanLiteral
                	return TerminalTimespanliteral(token);

                case (int)Symbols.Toolbar: //toolbar
                	return TerminalToolbar(token);

                case (int)Symbols.Toolbutton: //toolbutton
                	return TerminalToolbutton(token);

                case (int)Symbols.Treestore: //treestore
                	return TerminalTreestore(token);

                case (int)Symbols.Treeview: //treeview
                	return TerminalTreeview(token);

                case (int)Symbols.Try: //try
                	return TerminalTry(token);

                case (int)Symbols.Type: //type
                	return TerminalType(token);

                case (int)Symbols.Unique: //unique
                	return TerminalUnique(token);

                case (int)Symbols.Update: //update
                	return TerminalUpdate(token);

                case (int)Symbols.Using: //using
                	return TerminalUsing(token);

                case (int)Symbols.Var: //var
                	return TerminalVar(token);

                case (int)Symbols.Varchar: //varchar
                	return TerminalVarchar(token);

                case (int)Symbols.Vbox: //vbox
                	return TerminalVbox(token);

                case (int)Symbols.Vbuttonbox: //vbuttonbox
                	return TerminalVbuttonbox(token);

                case (int)Symbols.Vpaned: //vpaned
                	return TerminalVpaned(token);

                case (int)Symbols.While: //while
                	return TerminalWhile(token);

                case (int)Symbols.Widget: //widget
                	return TerminalWidget(token);

                case (int)Symbols.Window: //window
                	return TerminalWindow(token);

                case (int)Symbols.Arg: //<Arg>
                	return TerminalArg(token);

                case (int)Symbols.Args: //<Args>
                	return TerminalArgs(token);

                case (int)Symbols.Block: //<Block>
                	return TerminalBlock(token);

                case (int)Symbols.Casestms: //<Case Stms>
                	return TerminalCasestms(token);

                case (int)Symbols.Catch2: //<Catch>
                	return TerminalCatch2(token);

                case (int)Symbols.Catchs: //<Catchs>
                	return TerminalCatchs(token);

                case (int)Symbols.Columnlist: //<Column List>
                	return TerminalColumnlist(token);

                case (int)Symbols.Columnname: //<Column Name>
                	return TerminalColumnname(token);

                case (int)Symbols.Database2: //<Database>
                	return TerminalDatabase2(token);

                case (int)Symbols.Dbcolumn: //<DB Column>
                	return TerminalDbcolumn(token);

                case (int)Symbols.Dbcolumnattr: //<DB Column Attr>
                	return TerminalDbcolumnattr(token);

                case (int)Symbols.Dbcolumnattrlist: //<DB Column Attr List>
                	return TerminalDbcolumnattrlist(token);

                case (int)Symbols.Dbcolumntype: //<DB Column Type>
                	return TerminalDbcolumntype(token);

                case (int)Symbols.Dbcolumns: //<DB Columns>
                	return TerminalDbcolumns(token);

                case (int)Symbols.Dbtable: //<DB Table>
                	return TerminalDbtable(token);

                case (int)Symbols.Dbtableattr: //<DB Table Attr>
                	return TerminalDbtableattr(token);

                case (int)Symbols.Dbtableattrlist: //<DB Table Attr List>
                	return TerminalDbtableattrlist(token);

                case (int)Symbols.Dbtables: //<DB Tables>
                	return TerminalDbtables(token);

                case (int)Symbols.Dbtriggerrun: //<DB Trigger Run>
                	return TerminalDbtriggerrun(token);

                case (int)Symbols.Dbtriggerruns: //<DB Trigger Runs>
                	return TerminalDbtriggerruns(token);

                case (int)Symbols.Dictlist: //<Dict List>
                	return TerminalDictlist(token);

                case (int)Symbols.Expr: //<Expr>
                	return TerminalExpr(token);

                case (int)Symbols.Exprlist: //<Expr List>
                	return TerminalExprlist(token);

                case (int)Symbols.Funcarg: //<Func Arg>
                	return TerminalFuncarg(token);

                case (int)Symbols.Funcargs: //<Func args>
                	return TerminalFuncargs(token);

                case (int)Symbols.Function2: //<Function>
                	return TerminalFunction2(token);

                case (int)Symbols.Layoutblock: //<Layout Block>
                	return TerminalLayoutblock(token);

                case (int)Symbols.Layoutlist: //<Layout List>
                	return TerminalLayoutlist(token);

                case (int)Symbols.Menublock: //<Menu Block>
                	return TerminalMenublock(token);

                case (int)Symbols.Menuitem2: //<Menu Item>
                	return TerminalMenuitem2(token);

                case (int)Symbols.Menuitemslist: //<MenuItems List>
                	return TerminalMenuitemslist(token);

                case (int)Symbols.Normalstm: //<Normal Stm>
                	return TerminalNormalstm(token);

                case (int)Symbols.Numliteral: //<NumLiteral>
                	return TerminalNumliteral(token);

                case (int)Symbols.Opadd: //<Op Add>
                	return TerminalOpadd(token);

                case (int)Symbols.Opand: //<Op And>
                	return TerminalOpand(token);

                case (int)Symbols.Opassign: //<Op Assign>
                	return TerminalOpassign(token);

                case (int)Symbols.Opcompare: //<Op Compare>
                	return TerminalOpcompare(token);

                case (int)Symbols.Opequate: //<Op Equate>
                	return TerminalOpequate(token);

                case (int)Symbols.Opif: //<Op If>
                	return TerminalOpif(token);

                case (int)Symbols.Opmult: //<Op Mult>
                	return TerminalOpmult(token);

                case (int)Symbols.Opor: //<Op Or>
                	return TerminalOpor(token);

                case (int)Symbols.Oppointer: //<Op Pointer>
                	return TerminalOppointer(token);

                case (int)Symbols.Opunary: //<Op Unary>
                	return TerminalOpunary(token);

                case (int)Symbols.Qualifiedname: //<QualifiedName>
                	return TerminalQualifiedname(token);

                case (int)Symbols.Stm: //<Stm>
                	return TerminalStm(token);

                case (int)Symbols.Stmlist: //<Stm List>
                	return TerminalStmlist(token);

                case (int)Symbols.Storeitem: //<Store Item>
                	return TerminalStoreitem(token);

                case (int)Symbols.Storeitems: //<Store Items>
                	return TerminalStoreitems(token);

                case (int)Symbols.Thenstm: //<Then Stm>
                	return TerminalThenstm(token);

                case (int)Symbols.Treeviewcolumn: //<TreeView Column>
                	return TerminalTreeviewcolumn(token);

                case (int)Symbols.Treeviewcolumns: //<TreeView Columns>
                	return TerminalTreeviewcolumns(token);

                case (int)Symbols.Tryfinally: //<TryFinally>
                	return TerminalTryfinally(token);

                case (int)Symbols.Value: //<Value>
                	return TerminalValue(token);

                case (int)Symbols.Widget2: //<Widget>
                	return TerminalWidget2(token);

                case (int)Symbols.Wndparam: //<WndParam>
                	return TerminalWndparam(token);

                case (int)Symbols.Wndparamlist: //<WndParam List>
                	return TerminalWndparamlist(token);

            }
            throw new SymbolException("Unknown symbol");
        }
 public TokenErrorEventArgs(TerminalToken token)
 {
     this.token  = token;
     this.contin = false;
 }
Beispiel #33
0
 private bool ProcessCommentStart(TerminalToken token)
 {
     if (OnCommentRead == null)
         return (SkipAfterCommentEnd() != null);
     else
     {
         Location start = this.tokenizer.GetCurrentLocation();
         TerminalToken commentEnd = SkipAfterCommentEnd();
         bool result = commentEnd != null;
         if (result)
         {
             Location end = this.tokenizer.GetCurrentLocation();
             string str = this.tokenizer.GetInput();
             int len = end.Position - start.Position;
             string comment = str.Substring(start.Position, len - commentEnd.Text.Length);
             CommentReadEventArgs args = new CommentReadEventArgs(token.Text + comment,
                                                                  comment,
                                                                  false);
             OnCommentRead(this, args);
         }
         return result;
     }
 }
 public ShiftEventArgs(TerminalToken token, State newState)
 {
     this.token    = token;
     this.newState = newState;
 }
Beispiel #35
0
        private Object CreateObjectFromTerminal(TerminalToken token)
        {
            switch (token.Symbol.Id)
            {
                case (int)SymbolConstants.SYMBOL_EOF :
                //(EOF)
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_ERROR :
                //(Error)
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_WHITESPACE :
                //(Whitespace)
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_COMMENTLINE :
                //(Comment Line)
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_MINUS :
                //-
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_EXCLAMEQ :
                //!=
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_NUM :
                //#
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_DOLLAR :
                //$
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_PERCENT :
                //%
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_AMP :
                //&
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_AMPAMP :
                //&&
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_AMPAMPAMP :
                //&&&
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_LPARAN :
                //(
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_RPARAN :
                //)
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_TIMES :
                //*
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_COMMA :
                //,
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_DOT :
                //.
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_DIV :
                ///
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_COLON :
                //:
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_QUESTION :
                //?
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_AT :
                //@
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_ATASSERT :
                //@assert
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_CARET :
                //^
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_LBRACE :
                //{
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_PIPE :
                //|
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_PIPEPIPE :
                //||
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_RBRACE :
                //}
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_PLUS :
                //+
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_LT :
                //<
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_LTLT :
                //<<
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_LTEQ :
                //<=
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_LTGT :
                //<>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_EQEQ :
                //==
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_GT :
                //>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_GTEQ :
                //>=
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_GTGT :
                //>>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_A :
                //A
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_AB :
                //AB
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_ADD :
                //Add
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_B :
                //B
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_BA :
                //BA
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_CMP :
                //Cmp
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_COMMENT :
                //Comment
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_DAT :
                //Dat
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_DIV2 :
                //Div
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_DJN :
                //Djn
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_END :
                //End
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_EQU :
                //Equ
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_F :
                //F
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_FOR :
                //for
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_I :
                //I
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_INTEGER :
                //Integer
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_JMN :
                //Jmn
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_JMP :
                //Jmp
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_JMZ :
                //Jmz
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_LABEL :
                //Label
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_LDP :
                //Ldp
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_LINE :
                //Line
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_MOD :
                //Mod
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_MOV :
                //Mov
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_MUL :
                //Mul
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_NEWLINE :
                //NewLine
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_NOP :
                //Nop
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_ORG :
                //Org
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_PIN :
                //Pin
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_ROF :
                //rof
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_SEQ :
                //Seq
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_SLT :
                //Slt
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_SNE :
                //Sne
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_SPL :
                //Spl
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_STP :
                //Stp
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_SUB :
                //Sub
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_X :
                //X
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_ADDEXP :
                //<Add Exp>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_ALLSTATEMENTS :
                //<AllStatements>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_ALLSTATEMENTSOPTIONAL :
                //<AllStatementsOptional>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_ANDEXP :
                //<And Exp>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_ASSERT :
                //<Assert>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_BINANDEXP :
                //<BinAnd Exp>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_BINOREXP :
                //<BinOr Exp>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_BINXOREXP :
                //<BinXor Exp>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_COMPAREEXP :
                //<Compare Exp>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_ENDOPTIONAL :
                //<EndOptional>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_EOL :
                //<eol>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_EOLOPTIONAL :
                //<eolOptional>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_EOLSINGLE :
                //<eolSingle>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_EQU2 :
                //<Equ>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_EQUATEEXP :
                //<Equate Exp>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_EXPRESSION :
                //<Expression>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_EXPRESSIONOPTIONAL :
                //<ExpressionOptional>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_FOR2 :
                //<For>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_LABEL2 :
                //<Label>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_LABELS :
                //<Labels>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_LABELSOPTIONAL :
                //<LabelsOptional>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_MODE :
                //<Mode>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_MODEOPTIONAL :
                //<ModeOptional>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_MODIFIER :
                //<Modifier>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_MULTEXP :
                //<Mult Exp>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_NEGATEEXP :
                //<Negate Exp>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_OPERATION :
                //<Operation>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_OPERATION0 :
                //<Operation0>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_OPERATION1 :
                //<Operation1>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_OPERATION2 :
                //<Operation2>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_OPERATOR0 :
                //<Operator0>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_OPERATOR1 :
                //<Operator1>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_OPERATOR2 :
                //<Operator2>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_OREXP :
                //<Or Exp>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_ORG2 :
                //<Org>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_PARAMETER :
                //<Parameter>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_PIN2 :
                //<Pin>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_SHIFTEXP :
                //<Shift Exp>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_START :
                //<Start>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_STATEMENT :
                //<Statement>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_VALUE :
                //<Value>
                //todo: Create a new object that corresponds to the symbol
                return null;

            }
            throw new SymbolException("Unknown symbol");
        }
Beispiel #36
0
        protected virtual Object CreateObject(TerminalToken token)
        {
            switch (token.Symbol.Id)
            {
                case (int)SymbolConstants.SYMBOL_EOF :
                //(EOF)
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_ERROR :
                //(Error)
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_WHITESPACE :
                //(Whitespace)
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_MINUS :
                //'-'
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_LPARAN :
                //'('
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_RPARAN :
                //')'
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_COMMA :
                //','
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_COLON :
                //':'
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_ATCMD :
                //'@cmd'
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_LBRACKETCOMMANDRBRACKET :
                //'[Command]'
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_LBRACKETDEVICEINFORBRACKET :
                //'[DeviceInfo]'
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_LBRACE :
                //'{'
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_RBRACE :
                //'}'
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_CLASSEQ :
                //'class='
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_CMD :
                //Cmd
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_CMDEQ :
                //'cmd='
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_CMDCLASS :
                //CmdClass
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_CMDTYPE :
                //CmdType
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_DESCRIPTIONEQ :
                //'description='
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_DEVICEID :
                //DeviceID
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_DEVICEIDEQ :
                //'DeviceID='
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_DEVICETYPEEQ :
                //'DeviceType='
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_FLOAT :
                //Float
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_FUNC_NAMEEQ :
                //'func_name='
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_HEXDIGITS :
                //HexDigits
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_IDENTIFIER :
                //Identifier
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_IP :
                //IP
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_IPEQ :
                //'IP='
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_NUMBER :
                //Number
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_PORTEQ :
                //'Port='
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_RETURNEQ :
                //'return='
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_SENDEQ :
                //'send='
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_STRINGLITERAL :
                //StringLiteral
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_TESTEQ :
                //'test='
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_TYPEEQ :
                //'type='
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_VERSIONEQ :
                //'Version='
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_BYTES :
                //<Bytes>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_CMD2 :
                //<Cmd>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_CMDCLASS2 :
                //<CmdClass>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_CMDTITLE :
                //<CmdTitle>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_CMDTYPE2 :
                //<CmdType>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_COMMAND :
                //<Command>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_COMMANDLIST :
                //<CommandList>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_DESCRIPTION :
                //<Description>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_DEVICEID2 :
                //<DeviceId>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_DEVICEINFO :
                //<DeviceInfo>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_DEVICETYPE :
                //<DeviceType>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_EXPRESSITEM :
                //<ExpressItem>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_EXPRESSLIST :
                //<ExpressList>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_FUNCNAME :
                //<FuncName>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_HVALUE :
                //<HValue>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_IP2 :
                //<IP>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_LVALUE :
                //<LValue>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_NUMBERLIST :
                //<NumberList>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_PORT :
                //<Port>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_PROGRAM :
                //<Program>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_RANGEITEM :
                //<RangeItem>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_RANGEVALUE :
                //<RangeValue>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_REPEATEXPRESS :
                //<RepeatExpress>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_RETURNEXPRESS :
                //<ReturnExpress>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_SELECTITEM :
                //<SelectItem>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_SELECTVALUE :
                //<SelectValue>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_SELECTVALUES :
                //<SelectValues>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_SENDEXPRESS :
                //<SendExpress>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_SUBCMD :
                //<SubCmd>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_TESTEXPRESS :
                //<TestExpress>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_TESTEXPRESSLIST :
                //<TestExpressList>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_TESTGROUPEXPRESS :
                //<TestGroupExpress>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_TESTITEM :
                //<TestItem>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_TESTITEMLIST :
                //<TestItemList>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_TESTRANGEITEM :
                //<TestRangeItem>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_TESTREPEATITEMS :
                //<TestRepeatItems>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_TESTSELECTITEM :
                //<TestSelectItem>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_TESTSELECTVALUE :
                //<TestSelectValue>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_TESTSELECTVALUES :
                //<TestSelectValues>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_VALUEDESCRIPTION :
                //<ValueDescription>
                //todo: Create a new object that corresponds to the symbol
                return null;

                case (int)SymbolConstants.SYMBOL_VERSION :
                //<Version>
                //todo: Create a new object that corresponds to the symbol
                return null;

            }
            throw new SymbolException("Unknown symbol");
        }
Beispiel #37
0
		private bool ProcessError(TerminalToken token)
		{
			if (OnTokenError != null)
			{
				TokenErrorEventArgs e = new TokenErrorEventArgs(token);
				OnTokenError(this, e);
				return e.Continue;
			}
			else
				return false;
		}
Beispiel #38
0
 public DecimalLiteral(TerminalToken token)
 {
     val = Parse(token.Text);
 }
		/// <summary>
		/// <para>Symbol: Value</para>
		/// <para><c>&lt;Value&gt;</c></para>
		/// </summary>
		protected virtual object TerminalValue(TerminalToken token)
		{
			throw new NotImplementedException("Symbol Value");
		}
Beispiel #40
0
        private Object CreateObjectFromTerminal(TerminalToken token)
        {
            switch (token.Symbol.Id)
            {
            case (int)SymbolConstants.SYMBOL_EOF:
                //(EOF)
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ERROR:
                //(Error)
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_WHITESPACE:
                //Whitespace
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_MINUS:
                //'-'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LPAREN:
                //'('
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_RPAREN:
                //')'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TIMES:
                //'*'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DOT:
                //'.'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DIV:
                //'/'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SEMI:
                //';'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LBRACKETDEFAULT:
                //'[default'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_RBRACKET:
                //']'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LBRACE:
                //'{'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LBRACECASE:
                //'{case'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_RBRACE:
                //'}'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PLUS:
                //'+'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LT:
                //'<'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EQ:
                //'='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_GT:
                //'>'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_0:
                //'0'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_1:
                //'1'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_2:
                //'2'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_3:
                //'3'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_4:
                //'4'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_5:
                //'5'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_6:
                //'6'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_7:
                //'7'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_8:
                //'8'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_9:
                //'9'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_A:
                //a
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_B:
                //b
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_BEGIN:
                //begin
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CASE:
                //case
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DO:
                //do
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ELSE:
                //else
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ENDDO:
                //endDo
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FOR:
                //for
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_IDENTIFIER:
                //Identifier
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_IF:
                //if
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_NEWLINE:
                //NewLine
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_STRINGLITERAL:
                //StringLiteral
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SWITCH:
                //Switch
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_THEN:
                //then
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_VAR:
                //var
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_WHILE:
                //while
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_Z:
                //z
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CHAR:
                //<Char>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CODE:
                //<code>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DO2:
                //<Do>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EXPRMINUSCONDTION:
                //<expr-Condtion>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EXPRESSION:
                //<Expression>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EXPRMINUSOP:
                //<expr-op>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FLOAT:
                //<float>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FORMINUSSTMT:
                //<for-stmt>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_IFMINUSSTMT:
                //<if-stmt>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_INT:
                //<Int>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LOGICALMINUSEXPR:
                //<logical-Expr>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_MIX:
                //<Mix>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_MULTEXP:
                //<Mult Exp>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_NEGATEEXP:
                //<Negate Exp>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_NL:
                //<nl>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_NLOPT:
                //<nl Opt>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_NUM:
                //<Num>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PROGRAM:
                //<Program>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_START:
                //<Start>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_STMT:
                //<stmt>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_STMTMINUSLIST:
                //<stmt-list>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SWITCHMINUSSTMT:
                //<switch-stmt>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TYPE:
                //<type>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_VALUE:
                //<Value>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_VAR2:
                //<Var>
                //todo: Create a new object that corresponds to the symbol
                return(null);
            }
            throw new SymbolException("Unknown symbol");
        }
Beispiel #41
0
        private Object CreateObjectFromTerminal(TerminalToken token)
        {
            switch (token.Symbol.Id)
            {
            case (int)SymbolConstants.SYMBOL_EOF:
                //(EOF)
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ERROR:
                //(Error)
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_WHITESPACE:
                //Whitespace
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_MINUS:
                //'-'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_MINUSMINUS:
                //'--'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EXCLAMEQ:
                //'!='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PERCENT:
                //'%'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LPAREN:
                //'('
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_RPAREN:
                //')'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TIMES:
                //'*'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_COMMA:
                //','
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DIV:
                //'/'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_COLON:
                //':'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SEMI:
                //';'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LBRACE:
                //'{'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_RBRACE:
                //'}'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PLUS:
                //'+'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PLUSPLUS:
                //'++'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LT:
                //'<'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LTEQ:
                //'<='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EQ:
                //'='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EQEQ:
                //'=='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_GT:
                //'>'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_GTEQ:
                //'>='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_BREAK:
                //break
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CASE:
                //case
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CHAR:
                //char
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CLASS:
                //class
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DEFAULT:
                //default
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DO:
                //do
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DOUBLE:
                //double
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ELSE:
                //else
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FOR:
                //for
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_IDENTIFIER:
                //Identifier
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_IF:
                //if
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_INT:
                //int
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_NUM:
                //Num
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PRIVATE:
                //private
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PUBLIC:
                //public
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_RETURN:
                //return
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_STRING:
                //string
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SWITCH:
                //switch
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_THEN:
                //then
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_VOID:
                //void
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_WHILE:
                //while
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ACCESMINUSMOD:
                //<acces-mod>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ASSIGN:
                //<assign>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_BODY:
                //<body>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CASES:
                //<cases>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CLASSMINUSSTMT:
                //<class-stmt>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CONST:
                //<const>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EXPR:
                //<expr>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FACTOR:
                //<factor>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FORMINUSSTMT:
                //<for-stmt>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FUNMINUSSTMT:
                //<fun-stmt>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_IFMINUSSTMT:
                //<if-stmt>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_INC:
                //<inc>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LITERAL:
                //<literal>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LOGICMINUSEXPR:
                //<logic-expr>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_OP:
                //<op>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PARM:
                //<parm>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PROG:
                //<prog>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_STMT:
                //<stmt>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_STMTMINUSLIST:
                //<stmt-list>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SWITCHMINUSCASE:
                //<switch-case>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TERM:
                //<term>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TYPES:
                //<types>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_VARIABLE:
                //<variable>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_WHILEMINUSSTMT:
                //<while-stmt>
                //todo: Create a new object that corresponds to the symbol
                return(null);
            }
            throw new SymbolException("Unknown symbol");
        }
Beispiel #42
0
		private void FireParseError(TerminalToken token)
		{
			if (OnParseError != null)
			{
				ParseErrorEventArgs e = 
					new ParseErrorEventArgs(token, FindExpectedTokens());
				OnParseError(this, e);
				continueParsing = e.Continue;
				lookahead = e.NextToken;
			}
		}
		/// <summary>
		/// <para>Symbol: Then Stm</para>
		/// <para><c>&lt;Then Stm&gt;</c></para>
		/// </summary>
		protected virtual object TerminalThenstm(TerminalToken token)
		{
			throw new NotImplementedException("Symbol Then Stm");
		}
Beispiel #44
0
		private TerminalToken GetLookahead()
		{
			if (lookahead != null)
			{
				return lookahead;
			}
			do
			{
				TerminalToken token = tokenizer.RetrieveToken();
				if (token.Symbol is SymbolCommentLine)
				{
					if (!ProcessCommentLine(token))
						continueParsing = false;
				}
				else if (token.Symbol is SymbolCommentStart)
				{
					if (!ProcessCommenStart(token))
						continueParsing = false;
				}
				else if (token.Symbol is SymbolWhiteSpace)
				{
					if (!ProcessWhiteSpace(token))
						continueParsing = false;
				}
				else if (token.Symbol is SymbolError)
				{
					if (!ProcessError(token))
						continueParsing = false;
				}
				else
				{
					lookahead = token;
				}
				if (!continueParsing)
					break;
			} while (lookahead == null);

			if ((lookahead != null) && (OnTokenRead != null))
			{
				TokenReadEventArgs args = new TokenReadEventArgs(lookahead);
				OnTokenRead(this, args);
				if (args.Continue == false)
				{
					continueParsing = false;
					lookahead = null;
				}
			}
			return lookahead;
		}
		/// <summary>
		/// <para>Symbol: Widget</para>
		/// <para><c>&lt;Widget&gt;</c></para>
		/// </summary>
		protected virtual object TerminalWidget2(TerminalToken token)
		{
			throw new NotImplementedException("Symbol Widget");
		}
Beispiel #46
0
        private Object CreateObjectFromTerminal(TerminalToken token)
        {
            switch (token.Symbol.Id)
            {
            case (int)SymbolConstants.SYMBOL_EOF:
                //(EOF)
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ERROR:
                //(Error)
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_COMMENT:
                //Comment
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_NEWLINE:
                //NewLine
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_WHITESPACE:
                //Whitespace
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TIMESDIV:
                //'*/'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DIVTIMES:
                //'/*'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DIVDIV:
                //'//'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LPAREN:
                //'('
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_RPAREN:
                //')'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_COMMA:
                //','
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_COLON:
                //':'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SEMI:
                //';'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LBRACKET:
                //'['
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_RBRACKET:
                //']'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LBRACE:
                //'{'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_RBRACE:
                //'}'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LT:
                //'<'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EQ:
                //'='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_GT:
                //'>'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ENUM:
                //enum
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_HINTNAME:
                //HintName
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LIST:
                //list
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_MAP:
                //map
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_NAME:
                //Name
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PRIMITIVE:
                //Primitive
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SET:
                //set
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_STRING:
                //String
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TYPE:
                //type
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TYPEID:
                //TypeId
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_AGGREGATEARG:
                //<AggregateArg>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_BASETYPE:
                //<BaseType>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_BASETYPENAME:
                //<BaseTypeName>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ENUM2:
                //<Enum>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ENUMHINTS:
                //<EnumHints>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ENUMNAME:
                //<EnumName>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ENUMVALUE:
                //<EnumValue>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ENUMVALUES:
                //<EnumValues>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FIELDNAME:
                //<FieldName>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_HINT:
                //<Hint>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_HINTNAME2:
                //<HintName>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_HINTVALUE:
                //<HintValue>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LISTFIELD:
                //<ListField>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_MAPFIELD:
                //<MapField>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PRIMITIVEFIELD:
                //<PrimitiveField>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PRIMITIVEFIELDTYPE:
                //<PrimitiveFieldType>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_REFERENCEFIELD:
                //<ReferenceField>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_REFERENCEFIELDTYPE:
                //<ReferenceFieldType>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SCHEMA:
                //<Schema>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SCHEMAELEMENTS:
                //<SchemaElements>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SCHEMANAME:
                //<SchemaName>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SCHEMANAMEELEMENT:
                //<SchemaNameElement>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SETFIELD:
                //<SetField>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TYPE2:
                //<Type>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TYPEFIELD:
                //<TypeField>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TYPEFIELDS:
                //<TypeFields>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TYPEHINTS:
                //<TypeHints>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TYPEID2:
                //<TypeId>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TYPENAME:
                //<TypeName>
                //todo: Create a new object that corresponds to the symbol
                return(null);
            }
            throw new SymbolException("Unknown symbol");
        }
Beispiel #47
0
        private Object CreateObjectFromTerminal(TerminalToken token)
        {
            switch (token.Symbol.Id)
            {
            case (int)SymbolConstants.SYMBOL_EOF:
                //(EOF)
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ERROR:
                //(Error)
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_WHITESPACE:
                //Whitespace
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_MINUS:
                //'-'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LPAREN:
                //'('
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_RPAREN:
                //')'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LT:
                //'<'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LTEQ:
                //'<='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LTGT:
                //'<>'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EQ:
                //'='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_GT:
                //'>'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_GTEQ:
                //'>='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_AND:
                //and
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_AS:
                //as
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_BACK:
                //back
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_BETWEEN:
                //between
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CATALOG:
                //catalog
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CLONE:
                //clone
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_COLUMNS:
                //columns
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DECIMAL:
                //Decimal
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DEFAULT:
                //default
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EXPORT:
                //export
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_HTML:
                //html
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_IDENTIFIER:
                //Identifier
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_IMPORT:
                //import
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_INTEGER:
                //Integer
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_IS:
                //is
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_JSON:
                //json
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LIKE:
                //like
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LOAD:
                //load
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_NEWLINE:
                //NewLine
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_NOT:
                //not
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_NULL:
                //null
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ON:
                //on
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PASSWORD:
                //password
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_RELATE:
                //relate
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_REMOVE:
                //remove
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ROOT:
                //root
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SERVER:
                //server
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SQL:
                //sql
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_STRINGLITERAL:
                //StringLiteral
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TABLE:
                //table
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TABLES:
                //tables
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TO:
                //to
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TOP:
                //top
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_UNRELATE:
                //unrelate
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_USER:
                //user
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_WHERE:
                //where
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_XML:
                //xml
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ASEXP:
                //<AsExp>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_BACKEXP:
                //<BackExp>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CATALOGEXP:
                //<CatalogExp>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CLONEEXP:
                //<CloneExp>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_COLUMNSEXP:
                //<ColumnsExp>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_COMMANDEXP:
                //<CommandExp>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EXPORTEXP:
                //<ExportExp>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EXPRESSION:
                //<Expression>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_IMPORTEXP:
                //<ImportExp>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LOADEXP:
                //<LoadExp>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_NEGATEEXP:
                //<Negate Exp>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_NL:
                //<nl>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_NLOPT:
                //<nl Opt>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PASSWORDEXP:
                //<PasswordExp>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_RELATEEXP:
                //<RelateExp>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_REMOVEEXP:
                //<RemoveExp>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ROOTEXP:
                //<RootExp>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SERVEREXP:
                //<ServerExp>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_START:
                //<Start>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TABLEEXP:
                //<TableExp>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TABLESEXP:
                //<TablesExp>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TOPNEXP:
                //<TopnExp>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_UNRELATEEXP:
                //<UnrelateExp>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_USEREXP:
                //<UserExp>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_VALUE:
                //<Value>
                //todo: Create a new object that corresponds to the symbol
                return(null);
            }
            throw new SymbolException("Unknown symbol");
        }
Beispiel #48
0
 public IntLiteral(TerminalToken token)
 {
     val = Parse(token.Text);
 }
Beispiel #49
0
        private Object CreateObject(TerminalToken token)
        {
            switch (token.Symbol.Id)
            {
            case (int)SymbolConstants.SYMBOL_EOF:
                //(EOF)
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ERROR:
                //(Error)
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_COMMENT:
                //Comment
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_WHITESPACE:
                //Whitespace
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PERCENT:
                //'%'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TIMESDIV:
                //'*/'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DIVTIMES:
                //'/*'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_MINUS:
                //'-'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EXCLAM:
                //'!'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LPAREN:
                //'('
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_RPAREN:
                //')'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_RPARENDOT:
                //').'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TIMES:
                //'*'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_COMMA:
                //','
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DOT:
                //'.'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DIV:
                //'/'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_COLON:
                //':'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_COLONMINUS:
                //':-'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SEMI:
                //';'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PLUS:
                //'+'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LT:
                //'<'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LTEQ:
                //'<='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LTGT:
                //'<>'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EQ:
                //'='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_GT:
                //'>'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_GTEQ:
                //'>='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CHAR:
                //char
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CLAUSES:
                //clauses
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DOUBLE:
                //double
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_GOAL:
                //goal
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_IDENTIFIER:
                //Identifier
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_INT:
                //Int
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_INTEGER:
                //integer
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_NEWLINE:
                //NewLine
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_NONDETERM:
                //nondeterm
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PREDICATES:
                //predicates
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PRERULE:
                //preRule
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_REAL:
                //real
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_REL:
                //rel
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SINGLE:
                //single
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_STRING:
                //string
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SYMBOL:
                //symbol
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ADDEXP:
                //<Add Exp>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CLAUSES2:
                //<Clauses>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CLURULES:
                //<CluRules>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_COMMAB:
                //<commab>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_COMMAC:
                //<commaC>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_COMMAP:
                //<commaP>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DATATYPE:
                //<datatype>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DOB:
                //<dob>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EXPRESSION:
                //<Expression>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FACTORRULE:
                //<FactOrRule>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FIRSTRULE:
                //<firstRule>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_GENERALRULE:
                //<GeneralRule>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_GOAL2:
                //<Goal>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_MULTEXP:
                //<Mult Exp>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_NEGATEEXP:
                //<Negate Exp>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_NL:
                //<nl>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_NLOPT:
                //<nl Opt>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_OR:
                //<Or>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PARAMETERS:
                //<Parameters>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PREDICATE:
                //<Predicate>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PRESTAT:
                //<prestat>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PRO:
                //<Pro>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_RULE:
                //<Rule>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SING:
                //<sing>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SWITCH:
                //<switch>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SWITCHDOT:
                //<switch dot>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SWITCHBODY:
                //<switchbody>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_VALUE:
                //<Value>
                //todo: Create a new object that corresponds to the symbol
                return(null);
            }
            throw new SymbolException("Unknown symbol");
        }
Beispiel #50
0
 public ShiftEventArgs(TerminalToken token, State newState)
 {
     this.token = token;
     this.newState = newState;
 }
		/// <summary>
		/// <para>Symbol: Store Items</para>
		/// <para><c>&lt;Store Items&gt;</c></para>
		/// </summary>
		protected virtual object TerminalStoreitems(TerminalToken token)
		{
			throw new NotImplementedException("Symbol Store Items");
		}
Beispiel #52
0
 public TokenErrorEventArgs(TerminalToken token)
 {
     this.token = token;
     contin = false;
 }
Beispiel #53
0
 public TokenReadEventArgs(TerminalToken token)
 {
     this.token = token;
     contin = true;
 }
Beispiel #54
0
        private Object CreateObject(TerminalToken token)
        {
            switch (token.Symbol.Id)
            {
            case (int)SymbolConstants.SYMBOL_EOF:
                //(EOF)
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ERROR:
                //(Error)
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_WHITESPACE:
                //Whitespace
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_MINUS:
                //'-'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EXCLAMEQ:
                //'!='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LPAREN:
                //'('
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_RPAREN:
                //')'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TIMES:
                //'*'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_COMMA:
                //','
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DIV:
                //'/'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PLUS:
                //'+'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LT:
                //'<'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LTEQ:
                //'<='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EQEQ:
                //'=='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_GT:
                //'>'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_GTEQ:
                //'>='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DOUBLE:
                //Double
                //todo: Create a new object that corresponds to the symbol
                return(new OpeLang.Terminal.Double(double.Parse(token.Text)));

            case (int)SymbolConstants.SYMBOL_ELSE:
                //else
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ELSIF:
                //elsif
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ENDIF:
                //endif
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_IDENTIFIER:
                //Identifier
                //todo: Create a new object that corresponds to the symbol
                return(new OpeLang.Terminal.Identifier(token.Text));

            case (int)SymbolConstants.SYMBOL_IF:
                //if
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_NEWLINE:
                //NewLine
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_THEN:
                //then
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_UINTEGER:
                //UInteger
                //todo: Create a new object that corresponds to the symbol
                return(new OpeLang.Terminal.UInteger(uint.Parse(token.Text)));

            case (int)SymbolConstants.SYMBOL_ARGS:
                //<Args>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CONDITION:
                //<Condition>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ELSEIF:
                //<ElseIf>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EXPRESSION:
                //<Expression>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_IFSTATMENT:
                //<IfStatment>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_NL:
                //<nl>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_NLOPT:
                //<nl Opt>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_NUM:
                //<Num>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_OPE:
                //<Ope>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_POSITIVENUM:
                //<PositiveNum>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PROGRAM:
                //<Program>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SENTENCE:
                //<Sentence>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_START:
                //<Start>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TERM:
                //<Term>
                //todo: Create a new object that corresponds to the symbol
                return(null);
            }
            throw new SymbolException("Unknown symbol");
        }
 public TokenReadEventArgs(TerminalToken token)
 {
     this.token = token;
     contin     = true;
 }
Beispiel #56
0
 public ParseErrorEventArgs(TerminalToken unexpectedToken, SymbolCollection expectedTokens)
 {
     this.unexpectedToken = unexpectedToken;
     this.expectedTokens = expectedTokens;
     contin = ContinueMode.Stop;
     nextToken = null;
 }
Beispiel #57
0
        private Object CreateObjectFromTerminal(TerminalToken token)
        {
            switch (token.Symbol.Id)
            {
            case (int)SymbolConstants.SYMBOL_EOF:
                //(EOF)
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ERROR:
                //(Error)
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_WHITESPACE:
                //Whitespace
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_MINUS:
                //'-'
                //todo: Create a new object that corresponds to the symbol
                return(null);


            case (int)SymbolConstants.SYMBOL_MINUSMINUS:
                //'--'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EXCLAMEQ:
                //'!='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PERCENT:
                //'%'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LPAREN:
                //'('
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_RPAREN:
                //')'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TIMES:
                //'*'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_COMMA:
                //','
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_DIV:
                //'/'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_COLON:
                //':'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_COLONCOLON:
                //'::'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_SEMI:
                //';'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PLUS:
                //'+'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PLUSPLUS:
                //'++'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LT:
                //'<'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LTEQ:
                //'<='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EQ:
                //'='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EQEQ:
                //'=='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_GT:
                //'>'
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_GTEQ:
                //'>='
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CHAR:
                //char
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CLASS:
                //Class
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ELSE:
                //else
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_END:
                //End
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FLOAT:
                //Float
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FROM:
                //from
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FUNCTION:
                //function
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_IDENTIFIER:
                //Identifier
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_IF:
                //if
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_INT:
                //int
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_NUM:
                //Num
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PRIVATE:
                //Private
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PROTECTED:
                //Protected
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PUBLIC:
                //Public
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_REAL:
                //real
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_START:
                //Start
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_STATIC:
                //static
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_STRING:
                //string
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TO:
                //to
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_VOID:
                //void
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ARGS:
                //<args>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_ASSIGN:
                //<assign>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CMINUSELEMET:
                //<c-elemet>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CLASS2:
                //<class>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CMINUSLIST:
                //<c-list>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CMINUSMETHOD:
                //<c-method>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_CMINUSTYPE:
                //<c-type>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_EXPR:
                //<expr>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FACTOR:
                //<factor>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FCALL:
                //<fcall>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FORMINUSSTMT:
                //<for-stmt>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FSTMT:
                //<fstmt>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FSTMTMINUSLIST:
                //<fstmt-list>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_FUNCMINUSSTMT:
                //<func-stmt>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_IFMINUSSTMT:
                //<if-stmt>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_INC:
                //<inc>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_INITMINUSLIST:
                //<init-list>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_LOGICMINUSEXPR:
                //<logic-expr>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_OP:
                //<op>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_PROGRAM:
                //<program>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_RETURN:
                //<return>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_STMT:
                //<stmt>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_STMTMINUSLIST:
                //<stmt-list>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TERM:
                //<term>
                //todo: Create a new object that corresponds to the symbol
                return(null);

            case (int)SymbolConstants.SYMBOL_TYPES:
                //<types>
                //todo: Create a new object that corresponds to the symbol
                return(null);
            }
            throw new SymbolException("Unknown symbol");
        }