NVelocity.Runtime.Parser.ParserTokenManager.MoreLexicalActions C# (CSharp) Méthode

MoreLexicalActions() private méthode

private MoreLexicalActions ( ) : void
Résultat void
        private void MoreLexicalActions()
        {
            jjimageLen += (jjmatchedPos + 1);
            switch(jjmatchedKind)
            {
                case 10:
                    if (image == null)
                        image = new StringBuilder(new String(input_stream.GetSuffix(jjimageLen)));
                    else
                        image.Append(input_stream.GetSuffix(jjimageLen));
                    jjimageLen = 0;
                    if (! inComment)
                    {
                        /*
            * if we find ourselves in REFERENCE, we need to pop down
            * to end the previous ref
            */

                        if (curLexState == REFERENCE)
                        {
                            StateStackPop();
                        }

                        if (debugPrint)
                            Console.Out.Write("$  : going to {0}", REFERENCE);

                        StateStackPush();
                        SwitchTo(REFERENCE);
                    }
                    break;
                case 11:
                    if (image == null)
                        image = new StringBuilder(new String(input_stream.GetSuffix(jjimageLen)));
                    else
                        image.Append(input_stream.GetSuffix(jjimageLen));
                    jjimageLen = 0;
                    if (! inComment)
                    {
                        /*
            * if we find ourselves in REFERENCE, we need to pop down
            * to end the previous ref
            */

                        if (curLexState == REFERENCE)
                        {
                            StateStackPop();
                        }

                        if (debugPrint)
                            Console.Out.Write("$!  : going to {0}", REFERENCE);

                        StateStackPush();
                        SwitchTo(REFERENCE);
                    }
                    break;
                case 12:
                    if (image == null)
                        image = new StringBuilder(new String(input_stream.GetSuffix(jjimageLen)));
                    else
                        image.Append(input_stream.GetSuffix(jjimageLen));
                    jjimageLen = 0;
                    if (!inComment)
                    {
                        if (curLexState == REFERENCE)
                        {
                            StateStackPop();
                        }

                        inComment = true;
                        StateStackPush();
                        SwitchTo(IN_SINGLE_LINE_COMMENT);
                    }
                    break;
                case 13:
                    if (image == null)
                        image = new StringBuilder(new String(input_stream.GetSuffix(jjimageLen)));
                    else
                        image.Append(input_stream.GetSuffix(jjimageLen));
                    jjimageLen = 0;
                    input_stream.Backup(1);
                    inComment = true;
                    StateStackPush();
                    SwitchTo(IN_FORMAL_COMMENT);
                    break;
                case 14:
                    if (image == null)
                        image = new StringBuilder(new String(input_stream.GetSuffix(jjimageLen)));
                    else
                        image.Append(input_stream.GetSuffix(jjimageLen));
                    jjimageLen = 0;
                    inComment = true;
                    StateStackPush();
                    SwitchTo(IN_MULTI_LINE_COMMENT);
                    break;
                case 15:
                    if (image == null)
                        image = new StringBuilder(new String(input_stream.GetSuffix(jjimageLen)));
                    else
                        image.Append(input_stream.GetSuffix(jjimageLen));
                    jjimageLen = 0;
                    if (! inComment)
                    {
                        /*
            * We can have the situation where #if($foo)$foo#end.
            * We need to transition out of REFERENCE before going to DIRECTIVE.
            * I don't really like this, but I can't think of a legal way
            * you are going into DIRECTIVE while in REFERENCE.  -gmj
            */

                        if (curLexState == REFERENCE || curLexState == REFMODIFIER)
                        {
                            StateStackPop();
                        }

                        inDirective = true;

                        if (debugPrint)
                            Console.Out.Write("# :  going to {0}", DIRECTIVE);

                        StateStackPush();
                        SwitchTo(PRE_DIRECTIVE);
                    }
                    break;
                default:
                    break;
            }
        }
ParserTokenManager