geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Dillon (JIRA)" <j...@apache.org>
Subject [jira] Commented: (GSHELL-112) Can not evaluate a variable followed by a quotation mark
Date Tue, 03 Jun 2008 14:54:45 GMT

    [ https://issues.apache.org/jira/browse/GSHELL-112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601964#action_12601964
] 

Jason Dillon commented on GSHELL-112:
-------------------------------------

So, as I mentioned in IRC I ripped out gshell-expr and replaced with a combination of plexus-interpolation
+ commons-jexl.  This handles the quote things better as well as leaves expressions asis when
no variable is bound.

BUT... it *ONLY* support the full syntax, as in:

{noformat}
echo ${myvariable}
{noformat}

*NOT*:

{noformat}
echo $myvariable
{noformat}

Anyways, this should be less error prone.  I also added a short-circuit to skip interpolation
if the input string does not contain a $.

Really need to look at adding this parsing and expansion directly into the gshell-parser muck,
perhaps can peep at how commons-jexl's javacc parser works and base gshell's support on it.

> Can not evaluate a variable followed by a quotation mark
> --------------------------------------------------------
>
>                 Key: GSHELL-112
>                 URL: https://issues.apache.org/jira/browse/GSHELL-112
>             Project: GShell
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: Parser
>    Affects Versions: 1.0-alpha-2
>         Environment: Windows
>            Reporter: YunFeng Ma
>            Assignee: Jason Dillon
>            Priority: Minor
>             Fix For: 1.0-alpha-2
>
>
> Run the following steps in gshell:
> {noformat}
> set username=system
> set password=manager
> set login="deploy/connect -u $username -w $password"
> {noformat}
> get the following Error message:
> {noformat}
> MaYunFeng@Host1:/> set login="deploy/connect -u $username -w $password"
> ERROR SyntaxException: Failed to evaluate: password"
> {noformat}

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


Mime
View raw message