Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 1.5
    • Component/s: Engine
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: Other

      Description

      Hello, I think, that this should work, but velocity throws parse error.

      #if(1 == 1)
      #stop
      #end

      I think, that the problem is in #stop statement, that velocity doesn't recognize it.

      1. ASF.LICENSE.NOT.GRANTED--stop.patch
        14 kB
        Will Glass-Husain
      2. ASF.LICENSE.NOT.GRANTED--testcases.zip
        1.0 kB
        Will Glass-Husain
      3. ASF.LICENSE.NOT.GRANTED--parser.java.patch
        12 kB
        Will Glass-Husain
      4. ASF.LICENSE.NOT.GRANTED--parser.java.patch
        12 kB
        Will Glass-Husain
      5. ASF.LICENSE.NOT.GRANTED--updated_complete_stop.patch
        28 kB
        Will Glass-Husain

        Activity

        Hide
        Henning Schmiedehausen added a comment -

        Close all resolved issues for Engine 1.5 release.

        Show
        Henning Schmiedehausen added a comment - Close all resolved issues for Engine 1.5 release.
        Hide
        Will Glass-Husain added a comment -

        Fixed. Revision # 124214

        Show
        Will Glass-Husain added a comment - Fixed. Revision # 124214
        Hide
        Will Glass-Husain added a comment -

        Created an attachment (id=11148)
        patch of all files necessary (replaces previous attachments)

        Show
        Will Glass-Husain added a comment - Created an attachment (id=11148) patch of all files necessary (replaces previous attachments)
        Hide
        Will Glass-Husain added a comment -

        As reported by Luis Antonio Castro Henriques, this patch was missing
        ASTStop.java. Now that I've got a better CVS client (and a little more
        smarts) I've made a new patch (single file) that combines everything all
        together. Just to be sure I downloaded CVS head, applied the patch, compiled
        and tested. Worked great. Sorry!

        Show
        Will Glass-Husain added a comment - As reported by Luis Antonio Castro Henriques, this patch was missing ASTStop.java. Now that I've got a better CVS client (and a little more smarts) I've made a new patch (single file) that combines everything all together. Just to be sure I downloaded CVS head, applied the patch, compiled and tested. Worked great. Sorry!
        Hide
        Will Glass-Husain added a comment -
            • Bug 25791 has been marked as a duplicate of this bug. ***
        Show
        Will Glass-Husain added a comment - Bug 25791 has been marked as a duplicate of this bug. ***
        Hide
        Will Glass-Husain added a comment -

        Created an attachment (id=8894)
        generated parser files (Parser.java.patch)

        Show
        Will Glass-Husain added a comment - Created an attachment (id=8894) generated parser files (Parser.java.patch)
        Hide
        Will Glass-Husain added a comment -

        Created an attachment (id=8893)
        generated parser files (Parser.java.patch)

        Show
        Will Glass-Husain added a comment - Created an attachment (id=8893) generated parser files (Parser.java.patch)
        Hide
        Will Glass-Husain added a comment -

        Hi Martin,

        As it involves a change to the parser the patch requires a bit of extra work
        to apply, namely compilation of Parser.jjt with javacc. I left the generated
        java files out of the patch in case the committers want to change the
        specifics. Let me upload them. Applying the next attachment along with the
        previous patches should work.

        Show
        Will Glass-Husain added a comment - Hi Martin, As it involves a change to the parser the patch requires a bit of extra work to apply, namely compilation of Parser.jjt with javacc. I left the generated java files out of the patch in case the committers want to change the specifics. Let me upload them. Applying the next attachment along with the previous patches should work.
        Hide
        Martin Novak added a comment -

        Thanks for your effort, but stop2.vm is not working properly.

        I downloaded sources from cvs and I applied the patch. Then I built sources and
        deployed my web application, but the test stop2.vm throwed the same error as
        before ;-[

        Show
        Martin Novak added a comment - Thanks for your effort, but stop2.vm is not working properly. I downloaded sources from cvs and I applied the patch. Then I built sources and deployed my web application, but the test stop2.vm throwed the same error as before ;-[
        Hide
        Will Glass-Husain added a comment -

        Created an attachment (id=8881)
        testcases.zip (2 zipped templates plus compare files)

        Show
        Will Glass-Husain added a comment - Created an attachment (id=8881) testcases.zip (2 zipped templates plus compare files)
        Hide
        Will Glass-Husain added a comment -

        Created an attachment (id=8880)
        patch to Parser.jj and various other java files

        Show
        Will Glass-Husain added a comment - Created an attachment (id=8880) patch to Parser.jj and various other java files
        Hide
        Will Glass-Husain added a comment -

        Went ahead and implemented a patch. Good chance to get more experience in
        javacc Implemented a flag in InternalHouseKeepingcontext-- does this seem
        the right place to track whether #stop has been encountered?

        Show
        Will Glass-Husain added a comment - Went ahead and implemented a patch. Good chance to get more experience in javacc Implemented a flag in InternalHouseKeepingcontext-- does this seem the right place to track whether #stop has been encountered?
        Hide
        Martin Novak added a comment -

        Of course, I'm curious about stop parsing - what is it good for? I think that
        stop renderning would be much more useful, not only for me, but for everyone.

        Yes, I need it! ;o]] I can offer you some help, althrough I'm only user of
        velocity ;-]

        Show
        Martin Novak added a comment - Of course, I'm curious about stop parsing - what is it good for? I think that stop renderning would be much more useful, not only for me, but for everyone. Yes, I need it! ;o]] I can offer you some help, althrough I'm only user of velocity ;-]
        Hide
        Geir Magnusson Jr added a comment -

        Yes - stop doesn't work. It never did. It's been lingering around since the beginning as something
        we wanted to do. Do you really need it? If so, we'll implement as 'stop rendering', as 'stop parsing'
        makes no sense.

        Show
        Geir Magnusson Jr added a comment - Yes - stop doesn't work. It never did. It's been lingering around since the beginning as something we wanted to do. Do you really need it? If so, we'll implement as 'stop rendering', as 'stop parsing' makes no sense.
        Hide
        Peter Romianowski added a comment -

        Hi,

        #stop does not mean "stop rendering" but "stop parsing". So the parser stops in
        the middle of you #if-block and thus complains that there is no #end.

        I ran into the same trouble

        Regards,
        Peter

        Show
        Peter Romianowski added a comment - Hi, #stop does not mean "stop rendering" but "stop parsing". So the parser stops in the middle of you #if-block and thus complains that there is no #end. I ran into the same trouble Regards, Peter

          People

          • Assignee:
            Unassigned
            Reporter:
            Martin Novak
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development