[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.145.40.120: ~ $
#!/usr/bin/perl -ws

use Parse::RecDescent;

my $parser = new Parse::RecDescent q
{
	components: ganglia(s)

	ganglia:    'ganglia' '{' cell(s) '}'

	cell:	    'cell' '{' synapse(s) '}'

	synapse:    'synapse' '{' WHATEVER '}'

	WHATEVER:    /\d\.\d\.\d/   # OBVIOUSLY REPLACE THIS WITH WHATEVER :-)
			<defer: print "$item[1]\n" >

} or die "Bad grammar!\n";

my $text = '';

getnextchunk($text)				# GET FIRST CHUNK OF DATA
	or die "No data!\n";

$text =~ s/\s*define\s*NetworkDetails\s*{//	# EAT OUTERMOST OPENING BRACKET
	or die "Bad data! (expected 'define...')";

do
{
	$parser->components(\$text);		# TRY TO EAT GANGLIA
}
while (getnextchunk($text));			# APPEND THE NEXT CHUNK

$text =~ m/\s*}/		# CHECK FOR THE OUTERMOST CLOSING BRACKET
	or die "Unclosed 'define' (missing '}')!";


sub getnextchunk	# APPEND SOME MORE TEXT TO THE FIRST ARG
{
	my $wasmore = 0;
	for (1..10)		# OPTIMALLY, ONE LINE BIGGER THAN THE LARGEST
				# SINGLE GANGLIA DEFINITION, BUT ANY NUMBER
				# OF LINES WILL DO
	{
		my $nextline = <DATA>;
		defined $nextline or last;
		$_[0] .= $nextline;
		$wasmore++
	}
	return $wasmore;
}

__DATA__

define NetworkDetails
{
	ganglia {
		cell {
			synapse { 1.1.1 }
			synapse { 1.1.2 }
			synapse { 1.1.3 }
			synapse { 1.1.4 }
			synapse { 1.1.5 }
		}
		cell {
			synapse { 1.2.1 }
			synapse { 1.2.2 }
			synapse { 1.2.3 }
			synapse { 1.2.4 }
			synapse { 1.2.5 }
		}
		cell {
			synapse { 1.3.1 }
			synapse { 1.3.2 }
			synapse { 1.3.3 }
			synapse { 1.3.4 }
			synapse { 1.3.5 }
		}
		cell {
			synapse { 1.4.1 }
			synapse { 1.4.2 }
			synapse { 1.4.3 }
			synapse { 1.4.4 }
			synapse { 1.4.5 }
		}
	}

	ganglia {
		cell {
			synapse { 2.1.1 }
			synapse { 2.1.2 }
			synapse { 2.1.3 }
			synapse { 2.1.4 }
			synapse { 2.1.5 }
		}
		cell {
			synapse { 2.2.1 }
			synapse { 2.2.2 }
			synapse { 2.2.3 }
			synapse { 2.2.4 }
			synapse { 2.2.5 }
		}
		cell {
			synapse { 2.3.1 }
			synapse { 2.3.2 }
			synapse { 2.3.3 }
			synapse { 2.3.4 }
			synapse { 2.3.5 }
		}
		cell {
			synapse { 2.4.1 }
			synapse { 2.4.2 }
			synapse { 2.4.3 }
			synapse { 2.4.4 }
			synapse { 2.4.5 }
		}
	}

	ganglia {
		cell {
			synapse { 3.1.1 }
			synapse { 3.1.2 }
			synapse { 3.1.3 }
			synapse { 3.1.4 }
			synapse { 3.1.5 }
		}
		cell {
			synapse { 3.2.1 }
			synapse { 3.2.2 }
			synapse { 3.2.3 }
			synapse { 3.2.4 }
			synapse { 3.2.5 }
		}
		cell {
			synapse { 3.3.1 }
			synapse { 3.3.2 }
			synapse { 3.3.3 }
			synapse { 3.3.4 }
			synapse { 3.3.5 }
		}
		cell {
			synapse { 3.4.1 }
			synapse { 3.4.2 }
			synapse { 3.4.3 }
			synapse { 3.4.4 }
			synapse { 3.4.5 }
		}
	}

	ganglia {
		cell {
			synapse { 4.1.1 }
			synapse { 4.1.2 }
			synapse { 4.1.3 }
			synapse { 4.1.4 }
			synapse { 4.1.5 }
		}
		cell {
			synapse { 4.2.1 }
			synapse { 4.2.2 }
			synapse { 4.2.3 }
			synapse { 4.2.4 }
			synapse { 4.2.5 }
		}
		cell {
			synapse { 4.3.1 }
			synapse { 4.3.2 }
			synapse { 4.3.3 }
			synapse { 4.3.4 }
			synapse { 4.3.5 }
		}
		cell {
			synapse { 4.4.1 }
			synapse { 4.4.2 }
			synapse { 4.4.3 }
			synapse { 4.4.4 }
			synapse { 4.4.5 }
		}
	}

}

Filemanager

Name Type Size Permission Actions
demo.c File 126 B 0644
demo.pl File 371 B 0644
demo_Cgrammar.pl File 10.08 KB 0644
demo_Cgrammar_v2.pl File 7.08 KB 0644
demo_LaTeXish.pl File 1.63 KB 0644
demo_LaTeXish_autoact.pl File 1.72 KB 0644
demo_NL2SQL.pl File 2.27 KB 0644
demo_OOautoparsetree.pl File 1.98 KB 0644
demo_OOparsetree.pl File 1.21 KB 0644
demo_PerlCSV.pl File 413 B 0644
demo_another_Cgrammar.pl File 21.08 KB 0644
demo_arithmetic.pl File 758 B 0644
demo_autorule.pl File 309 B 0644
demo_autoscoresep.pl File 587 B 0644
demo_autostub.pl File 271 B 0644
demo_bad.pl File 816 B 0644
demo_buildcalc.pl File 1.3 KB 0644
demo_calc.pl File 1.82 KB 0644
demo_codeblock.pl File 287 B 0644
demo_cpp.pl File 1.23 KB 0644
demo_decomment.pl File 2.55 KB 0644
demo_decomment_nonlocal.pl File 2.44 KB 0644
demo_delete.pl File 901 B 0644
demo_derived.pl File 891 B 0644
demo_dot.pl File 4.79 KB 0644
demo_embedding.pl File 977 B 0644
demo_errors.pl File 965 B 0644
demo_eval.pl File 1.15 KB 0644
demo_implicit.pl File 568 B 0644
demo_itemhash.pl File 1.64 KB 0644
demo_language.pl File 2.57 KB 0644
demo_leftassoc.pl File 1.06 KB 0644
demo_leftop.pl File 957 B 0644
demo_lexer.pl File 577 B 0644
demo_lisplike.pl File 1.49 KB 0644
demo_logic.pl File 542 B 0644
demo_matchrule.pl File 772 B 0644
demo_matchrule2.pl File 540 B 0644
demo_mccoy.pl File 516 B 0644
demo_metaRD.pm File 3.02 KB 0644
demo_methods.pl File 785 B 0644
demo_operator.pl File 835 B 0644
demo_opreps.pl File 1.01 KB 0644
demo_parsetree.pl File 661 B 0644
demo_perlparsing.pl File 956 B 0644
demo_piecewise.pl File 3.03 KB 0644
demo_precalc.pl File 743 B 0644
demo_quicklist.pl File 1.5 KB 0644
demo_randomsentence.pl File 2.89 KB 0644
demo_recipe.pl File 2.09 KB 0644
demo_restructure_easy.pl File 1.21 KB 0644
demo_restructure_painful.pl File 1.97 KB 0644
demo_scoredsep.pl File 606 B 0644
demo_selfmod.pl File 953 B 0644
demo_separators.pl File 779 B 0644
demo_simple.pl File 1.94 KB 0644
demo_simpleXML.pl File 1.87 KB 0644
demo_simplequery.pl File 831 B 0644
demo_skipcomment.pl File 609 B 0644
demo_street.pl File 502 B 0644
demo_template.pl File 688 B 0644
demo_textgen.pl File 5 KB 0644
demo_tokens.pl File 552 B 0644
demo_undumper.pl File 23.17 KB 0644
demo_whoson.pl File 2.61 KB 0644