Project

General

Profile

« Previous | Next » 

Revision 29517

implemented copy function that mimics the identify transform

View differences:

ft.jjt
52 52
TOKEN : {	< CONVERT:           "Convert" > }
53 53
TOKEN : {	< REGEXPR:           "RegExpr" > }
54 54
TOKEN : {	< GETVALUE:	         "getValue" > }
55
TOKEN : {   < COPY:              "copy" > }
55 56
TOKEN : {   < DECLARE_NAMESPACE: "declare_ns" > }
56 57
TOKEN : {   < DECLARE_SCRIPT:    "declare_script" > }
57 58
TOKEN : {   < DECLARE_SUBSCRIPT: "declare_subscript" > }
......
74 75
TOKEN : { < RBRACE: "}" > }
75 76
TOKEN : { < COMMA: "," > }
76 77
TOKEN : { < RPAREN: ")" > }
78
TOKEN : { < QUOTE: "'" > }
77 79

  
78 80
TOKEN :
79 81
{
......
337 339
        < RPAREN >
338 340
}
339 341

  
342
void copy(Rules r) #MyCopy : {}
343
{
+  {    jjtThis.setRule(r);  }
344
  	   < COPY >
345
	      < LPAREN >         	        { String templateMatchExpression; String applyTemplateSelectExpression; String copySelectExpression; }
346
	       templateMatchExpression = quotedString()
347
	       < COMMA >
348
	       applyTemplateSelectExpression = quotedString()
349
	       <  COMMA >
350
	       copySelectExpression = quotedString()
351
	      < RPAREN >	                { jjtThis.copy(templateMatchExpression, applyTemplateSelectExpression, copySelectExpression); }
340 352

  
353
}
354

  
341 355
void op(Rules r) #MyOp : {String functionName = ""; Token expr; Token expr2; Token vocab; String defaultPattern = ""; String function = ""; String elementName = ""; String regExpr; Token feature;}
342 356
{
343 357
	                                    {jjtThis.setRule(r);}
......
471 486
       assign(r)
472 487
     | op(r)
473 488
     | set(r)
489
     | copy(r)
474 490
     | empty(r)
475 491
     ) < SEMICOLON >  
476 492
}

Also available in: Unified diff