[ 
https://issues.apache.org/jira/browse/JEXL-44?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12750757#action_12750757
 ] 

Sebb edited comment on JEXL-44 at 9/2/09 5:59 PM:
--------------------------------------------------

Single-line ## comments still don't allow ", for example:

public void test44() throws Exception {
        JEXL.createExpression("## 'comment'\n"); // OK
        JEXL.createExpression("## \"comment\"\n");  // fails Lexical error at 
line 1, column 4.  Encountered: "\"" (34), after : "## "
}  

I would expect ## and // to behave identically; however the parser specifically 
does not allow double-quote after ##.
It's not clear why, as the syntax document does not mention anything special 
about double-quotes.
I think this is probably a bug.

==

Note that the trailing "\n" is necessary, otherwise the test fails with:

Lexical error at line 1, column 13.  Encountered: <EOF> after : "## \'comment\'"

Seems to me that <EOF> should be allowed to terminate a single-line comment.

      was (Author: [email protected]):
    ## comments still don't allow ", for example:

public void test44() throws Exception {
        JEXL.createExpression("## 'comment'\n"); // OK
        JEXL.createExpression("## \"comment\"\n");  // fails Lexical error at 
line 1, column 4.  Encountered: "\"" (34), after : "## "
}  

I would expect ## and // to behave identically; however the parser specifically 
does not allow double-quote after ##.
It's not clear why, as the syntax document does not mention anything special 
about double-quotes.
I think this is probably a bug.

==

Note that the trailing "\n" is necessary, otherwise the test fails with:

Lexical error at line 1, column 13.  Encountered: <EOF> after : "## \'comment\'"

Seems to me that <EOF> should be allowed to terminate a single-line comment.
  
> Comments don't allow double-quotes
> ----------------------------------
>
>                 Key: JEXL-44
>                 URL: https://issues.apache.org/jira/browse/JEXL-44
>             Project: Commons JEXL
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Sebb
>             Fix For: 2.0
>
>
> Comment lines should allow any characters; however for some reason 
> double-quotes are not allowed.
> Single quotes are OK.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to