Examples of VisualBasicComment


Examples of net.percederberg.grammatica.code.visualbasic.VisualBasicComment

            file.addNamespace(n);
        }

        // Add file comment
        str = file.toString() + "\n\n" + gen.getFileComment();
        file.addComment(new VisualBasicComment(VisualBasicComment.SINGLELINE,
                                               str));

        // Add type comment
        cls.addComment(new VisualBasicComment(TYPE_COMMENT));

        // Add constructor
        constr = new VisualBasicConstructor("ByVal input As TextReader");
        cls.addConstructor(constr);
        constr.addComment(new VisualBasicComment(CONSTRUCTOR_COMMENT));
        constr.addCode("MyBase.New(input, " +
                       getBoolean(!gen.getGrammar().getCaseSensitive()) +
                       ")");
        constr.addCode("CreatePatterns()");

        // Add init method
        cls.addMethod(initMethod);
        initMethod.addComment(new VisualBasicComment(INIT_METHOD_COMMENT));
        initMethod.addCode("Dim pattern as TokenPattern");
    }
View Full Code Here

Examples of net.percederberg.grammatica.code.visualbasic.VisualBasicComment

            file.addNamespace(n);
        }

        // Add file comment
        str = file.toString() + "\n\n" + gen.getFileComment();
        file.addComment(new VisualBasicComment(VisualBasicComment.SINGLELINE,
                                               str));

        // Add type comment
        cls.addComment(new VisualBasicComment(TYPE_COMMENT));

        // Add enter method
        enter.addComment(new VisualBasicComment(ENTER_COMMENT));
        enter.addCode("Select Case node.Id");
        cls.addMethod(enter);

        // Add exit method
        exit.addComment(new VisualBasicComment(EXIT_COMMENT));
        exit.addCode("Select Case node.Id");
        cls.addMethod(exit);

        // Add child method
        child.addComment(new VisualBasicComment(CHILD_COMMENT));
        child.addCode("Select Case node.Id");
        cls.addMethod(child);
    }
View Full Code Here

Examples of net.percederberg.grammatica.code.visualbasic.VisualBasicComment

            file.addNamespace(n);
        }

        // Add file comment
        str = file.toString() + "\n\n" + gen.getFileComment();
        file.addComment(new VisualBasicComment(VisualBasicComment.SINGLELINE,
                                               str));

        // Add type comment
        cls.addComment(new VisualBasicComment(TYPE_COMMENT));

        // Add enumeration
        cls.addEnumeration(enm);
        enm.addComment(new VisualBasicComment(ENUM_COMMENT));

        // Add constructor
        constr = new VisualBasicConstructor("ByVal input As TextReader");
        cls.addConstructor(constr);
        constr.addComment(new VisualBasicComment(CONSTRUCTOR1_COMMENT));
        constr.addCode("MyBase.New(input)");
        constr.addCode("CreatePatterns()");

        // Add constructor
        constr = new VisualBasicConstructor("ByVal input As TextReader, " +
                                            "ByVal analyzer As " +
                                            analyzer.getClassName());
        cls.addConstructor(constr);
        constr.addComment(new VisualBasicComment(CONSTRUCTOR2_COMMENT));
        constr.addCode("MyBase.New(input, analyzer)");
        constr.addCode("CreatePatterns()");

        // Add tokenizer factory method
        method = new VisualBasicMethod(VisualBasicMethod.PROTECTED + VisualBasicMethod.OVERRIDES,
                                      "NewTokenizer",
                                      "ByVal input As TextReader",
                                      "Tokenizer");
        method.addComment(new VisualBasicComment(FACTORY_COMMENT));
        method.addCode("Return New " + tokenizer.getClassName() + "(input);");
        cls.addMethod(method);

        // Add init method
        cls.addMethod(initMethod);
        initMethod.addComment(new VisualBasicComment(INIT_METHOD_COMMENT));
        initMethod.addCode("Dim pattern As ProductionPattern");
        initMethod.addCode("Dim alt As ProductionPatternAlternative");
    }
View Full Code Here

Examples of net.percederberg.grammatica.code.visualbasic.VisualBasicComment

            file.addNamespace(n);
        }

        // Add file comment
        str = file.toString() + "\n\n" + gen.getFileComment();
        file.addComment(new VisualBasicComment(VisualBasicComment.SINGLELINE,
                                               str));

        // Add type comment
        enm.addComment(new VisualBasicComment(TYPE_COMMENT));
    }
View Full Code Here

Examples of net.percederberg.grammatica.code.visualbasic.VisualBasicComment

        m = new VisualBasicMethod(VisualBasicMethod.PUBLIC +
                                  VisualBasicMethod.OVERRIDABLE,
                                  "Enter" + name,
                                  "ByVal node As " + type,
                                  "");
        m.addComment(new VisualBasicComment(ENTER_COMMENT));
        cls.addMethod(m);
    }
View Full Code Here

Examples of net.percederberg.grammatica.code.visualbasic.VisualBasicComment

        m = new VisualBasicMethod(VisualBasicMethod.PUBLIC +
                                  VisualBasicMethod.OVERRIDABLE,
                                  "Exit" + name,
                                  "ByVal node As " + type,
                                  "Node");
        m.addComment(new VisualBasicComment(EXIT_COMMENT));
        m.addCode("Return node");
        cls.addMethod(m);
    }
View Full Code Here

Examples of net.percederberg.grammatica.code.visualbasic.VisualBasicComment

                                  VisualBasicMethod.OVERRIDABLE,
                                  "Child" + name,
                                  "ByVal node As Production, " +
                                  "ByVal child As Node",
                                  "");
        m.addComment(new VisualBasicComment(CHILD_COMMENT));
        m.addCode("node.AddChild(child)");
        cls.addMethod(m);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.