Bug 718 - RSL parser problems
: RSL parser problems
Status: RESOLVED FIXED
: CoG jglobus
gram
: 1.1a
: PC Windows 2000
: P2 normal
: ---
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2003-02-17 11:35 by
Modified: 2005-12-05 17:30 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2003-02-17 11:35:09
1)

If a \ is present in a quoted string, the java parser seems to get upset:

&(executable=/bin/echo)(arguments=\)
parses as expected

&(executable=/bin/echo)(arguments="\")

Gives a parser error:
Exception in thread "main" org.globus.rsl.TokenMgrError: Lexical error at line 
1, column 39.  Encountered: <EOF> after : "\"\\\")"
        at 
org.globus.rsl.RSLParserTokenManager.getNextToken
(RSLParserTokenManager.java:856)
        at org.globus.rsl.RSLParser.jj_ntk(RSLParser.java:648)
        at org.globus.rsl.RSLParser.value(RSLParser.java:353)
        at org.globus.rsl.RSLParser.valueSequence(RSLParser.java:301)
        at org.globus.rsl.RSLParser.relation(RSLParser.java:224)
        at org.globus.rsl.RSLParser.specification(RSLParser.java:138)
        at org.globus.rsl.RSLParser.specList(RSLParser.java:240)
        at org.globus.rsl.RSLParser.subSpecification(RSLParser.java:164)
        at org.globus.rsl.RSLParser.parse(RSLParser.java:123)
        at org.globus.rsl.RSLParser.main(RSLParser.java:37)

2) 

(* 2 *)
&(executable = $(GLOBUS_LOCATION) # '/bin/globus-sh-exec')
 (arguments = -e '$GLOBUS_SH_PERL -e ''print STDERR "stderr\n"; '
            #                      'print STDOUT "stdout\n";''')
 (scratch_dir = $(HOME) )
 (stdout = ( $(GLOBUSRUN_GASS_URL) # $(TEST_STDOUT) # ".001" )
           ( $(SCRATCH_DIRECTORY) # "/stdout.002" )
 )
 (stderr = ( $(GLOBUSRUN_GASS_URL) # $(TEST_STDERR) # ".001" )
	   ( $(SCRATCH_DIRECTORY) # "/stderr.002" )
 )
 (file_stage_out = ($(SCRATCH_DIRECTORY) # "/stdout.002"
                    $(GLOBUSRUN_GASS_URL) # $(TEST_STDOUT) # ".002")
                   ($(SCRATCH_DIRECTORY) # "/stderr.002"
                    $(GLOBUSRUN_GASS_URL) # $(TEST_STDERR) # ".002")
 )


Here's the output that I'm seeing when running the parser:

Exception in thread "main" org.globus.rsl.TokenMgrError: Lexical error at line 
3, column 61.  Encountered: "n" (110), after : "\'print STDERR \"stderr\\"
        at 
org.globus.rsl.RSLParserTokenManager.getNextToken
(RSLParserTokenManager.java:856)
        at org.globus.rsl.RSLParser.jj_ntk(RSLParser.java:648)
        at org.globus.rsl.RSLParser.explicitConcat(RSLParser.java:437)
        at org.globus.rsl.RSLParser.SimpleValue(RSLParser.java:383)
        at org.globus.rsl.RSLParser.value(RSLParser.java:364)
        at org.globus.rsl.RSLParser.valueSequence(RSLParser.java:301)
        at org.globus.rsl.RSLParser.relation(RSLParser.java:224)
        at org.globus.rsl.RSLParser.specification(RSLParser.java:138)
        at org.globus.rsl.RSLParser.specList(RSLParser.java:240)
        at org.globus.rsl.RSLParser.subSpecification(RSLParser.java:164)
        at org.globus.rsl.RSLParser.parse(RSLParser.java:123)
        at org.globus.rsl.RSLParser.main(RSLParser.java:37)

What I want to get out of this RSL is
argument1: -e
argument2: $GLOBUS_SH_PERL -e 'print STDERR "stderr\n"; print STDOUT 
"stdout\n";'

Perhaps the problem is related to using the ' '' '' ' constructions to escape 
' within the argument?
------- Comment #1 From 2003-03-25 10:54:51 -------
The RSL parser had incorrect escaping rules. The escaping rules were updated to 
follow the RSL spec.