ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/bioseg/trunk/bioseg-validate.pl
Revision: 3
Committed: Tue Aug 14 23:05:57 2007 UTC (11 years, 10 months ago) by kmr
File size: 734 byte(s)
Log Message:
Moved all files to trunk directory.

Line File contents
1 #!/usr/bin/perl
2 $integer = '[+-]?[0-9]+';
3 $real = '[+-]?[0-9]+\.[0-9]+';
4
5 $RANGE = '(\.\.)(\.)?';
6 $PLUMIN = q(\'\+\-\');
7 $FLOAT = "(($integer)|($real))([eE]($integer))?";
8 $EXTENSION = '<|>|~';
9
10 $boundary = "($EXTENSION)?$FLOAT";
11 $deviation = $FLOAT;
12
13 $rule_1 = $boundary . $PLUMIN . $deviation;
14 $rule_2 = $boundary . $RANGE . $boundary;
15 $rule_3 = $boundary . $RANGE;
16 $rule_4 = $RANGE . $boundary;
17 $rule_5 = $boundary;
18
19
20 print "$rule_5\n";
21 while (<>) {
22 # s/ +//g;
23 if ( /^($rule_1)$/ ) {
24 print;
25 }
26 elsif ( /^($rule_2)$/ ) {
27 print;
28 }
29 elsif ( /^($rule_3)$/ ) {
30 print;
31 }
32 elsif ( /^($rule_4)$/ ) {
33 print;
34 }
35 elsif ( /^($rule_5)$/ ) {
36 print;
37 }
38 else {
39 print STDERR "error in $_\n";
40 }
41
42 }

Properties

Name Value
svn:executable *