Code Duplication    Length = 20-20 lines in 6 locations

src/main/java/it/cnr/istc/pst/platinum/ai/lang/ddl/v3/parser/ddl3Parser.java 6 locations

@@ 3429-3448 (lines=20) @@
3426
					// token list labels: 
3427
					// rule list labels: 
3428
					// wildcard labels: 
3429
					if ( state.backtracking==0 ) {
3430
					retval.tree = root_0;
3431
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);
3432
3433
					root_0 = (Object)adaptor.nil();
3434
					// 70:61: -> ^( '!=' numeric_comparison_lvalue numeric_comparison_rvalue )
3435
					{
3436
						// /home/alessandro/opt/antlr/ddl3/ddl3.g:70:63: ^( '!=' numeric_comparison_lvalue numeric_comparison_rvalue )
3437
						{
3438
						Object root_1 = (Object)adaptor.nil();
3439
						root_1 = (Object)adaptor.becomeRoot(new DDLNumericParameterConstraint(stream_10.nextToken()), root_1);
3440
						adaptor.addChild(root_1, stream_numeric_comparison_lvalue.nextTree());
3441
						adaptor.addChild(root_1, stream_numeric_comparison_rvalue.nextTree());
3442
						adaptor.addChild(root_0, root_1);
3443
						}
3444
3445
					}
3446
3447
3448
					retval.tree = root_0;
3449
					}
3450
3451
					}
@@ 3382-3401 (lines=20) @@
3379
					// token list labels: 
3380
					// rule list labels: 
3381
					// wildcard labels: 
3382
					if ( state.backtracking==0 ) {
3383
					retval.tree = root_0;
3384
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);
3385
3386
					root_0 = (Object)adaptor.nil();
3387
					// 69:61: -> ^( '>=' numeric_comparison_lvalue numeric_comparison_rvalue )
3388
					{
3389
						// /home/alessandro/opt/antlr/ddl3/ddl3.g:69:63: ^( '>=' numeric_comparison_lvalue numeric_comparison_rvalue )
3390
						{
3391
						Object root_1 = (Object)adaptor.nil();
3392
						root_1 = (Object)adaptor.becomeRoot(new DDLNumericParameterConstraint(stream_24.nextToken()), root_1);
3393
						adaptor.addChild(root_1, stream_numeric_comparison_lvalue.nextTree());
3394
						adaptor.addChild(root_1, stream_numeric_comparison_rvalue.nextTree());
3395
						adaptor.addChild(root_0, root_1);
3396
						}
3397
3398
					}
3399
3400
3401
					retval.tree = root_0;
3402
					}
3403
3404
					}
@@ 3335-3354 (lines=20) @@
3332
					// token list labels: 
3333
					// rule list labels: 
3334
					// wildcard labels: 
3335
					if ( state.backtracking==0 ) {
3336
					retval.tree = root_0;
3337
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);
3338
3339
					root_0 = (Object)adaptor.nil();
3340
					// 68:61: -> ^( '<=' numeric_comparison_lvalue numeric_comparison_rvalue )
3341
					{
3342
						// /home/alessandro/opt/antlr/ddl3/ddl3.g:68:63: ^( '<=' numeric_comparison_lvalue numeric_comparison_rvalue )
3343
						{
3344
						Object root_1 = (Object)adaptor.nil();
3345
						root_1 = (Object)adaptor.becomeRoot(new DDLNumericParameterConstraint(stream_21.nextToken()), root_1);
3346
						adaptor.addChild(root_1, stream_numeric_comparison_lvalue.nextTree());
3347
						adaptor.addChild(root_1, stream_numeric_comparison_rvalue.nextTree());
3348
						adaptor.addChild(root_0, root_1);
3349
						}
3350
3351
					}
3352
3353
3354
					retval.tree = root_0;
3355
					}
3356
3357
					}
@@ 3288-3307 (lines=20) @@
3285
					// token list labels: 
3286
					// rule list labels: 
3287
					// wildcard labels: 
3288
					if ( state.backtracking==0 ) {
3289
					retval.tree = root_0;
3290
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);
3291
3292
					root_0 = (Object)adaptor.nil();
3293
					// 67:60: -> ^( '>' numeric_comparison_lvalue numeric_comparison_rvalue )
3294
					{
3295
						// /home/alessandro/opt/antlr/ddl3/ddl3.g:67:62: ^( '>' numeric_comparison_lvalue numeric_comparison_rvalue )
3296
						{
3297
						Object root_1 = (Object)adaptor.nil();
3298
						root_1 = (Object)adaptor.becomeRoot(new DDLNumericParameterConstraint(stream_23.nextToken()), root_1);
3299
						adaptor.addChild(root_1, stream_numeric_comparison_lvalue.nextTree());
3300
						adaptor.addChild(root_1, stream_numeric_comparison_rvalue.nextTree());
3301
						adaptor.addChild(root_0, root_1);
3302
						}
3303
3304
					}
3305
3306
3307
					retval.tree = root_0;
3308
					}
3309
3310
					}
@@ 3241-3260 (lines=20) @@
3238
					// token list labels: 
3239
					// rule list labels: 
3240
					// wildcard labels: 
3241
					if ( state.backtracking==0 ) {
3242
					retval.tree = root_0;
3243
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);
3244
3245
					root_0 = (Object)adaptor.nil();
3246
					// 66:60: -> ^( '<' numeric_comparison_lvalue numeric_comparison_rvalue )
3247
					{
3248
						// /home/alessandro/opt/antlr/ddl3/ddl3.g:66:62: ^( '<' numeric_comparison_lvalue numeric_comparison_rvalue )
3249
						{
3250
						Object root_1 = (Object)adaptor.nil();
3251
						root_1 = (Object)adaptor.becomeRoot(new DDLNumericParameterConstraint(stream_20.nextToken()), root_1);
3252
						adaptor.addChild(root_1, stream_numeric_comparison_lvalue.nextTree());
3253
						adaptor.addChild(root_1, stream_numeric_comparison_rvalue.nextTree());
3254
						adaptor.addChild(root_0, root_1);
3255
						}
3256
3257
					}
3258
3259
3260
					retval.tree = root_0;
3261
					}
3262
3263
					}
@@ 3194-3213 (lines=20) @@
3191
					// token list labels: 
3192
					// rule list labels: 
3193
					// wildcard labels: 
3194
					if ( state.backtracking==0 ) {
3195
					retval.tree = root_0;
3196
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);
3197
3198
					root_0 = (Object)adaptor.nil();
3199
					// 65:60: -> ^( '=' numeric_comparison_lvalue numeric_comparison_rvalue )
3200
					{
3201
						// /home/alessandro/opt/antlr/ddl3/ddl3.g:65:62: ^( '=' numeric_comparison_lvalue numeric_comparison_rvalue )
3202
						{
3203
						Object root_1 = (Object)adaptor.nil();
3204
						root_1 = (Object)adaptor.becomeRoot(new DDLNumericParameterConstraint(stream_22.nextToken()), root_1);
3205
						adaptor.addChild(root_1, stream_numeric_comparison_lvalue.nextTree());
3206
						adaptor.addChild(root_1, stream_numeric_comparison_rvalue.nextTree());
3207
						adaptor.addChild(root_0, root_1);
3208
						}
3209
3210
					}
3211
3212
3213
					retval.tree = root_0;
3214
					}
3215
3216
					}