Index: compilers/opsc/ops2c.nqp =================================================================== --- compilers/opsc/ops2c.nqp (revision 48692) +++ compilers/opsc/ops2c.nqp (working copy) @@ -75,7 +75,7 @@ -h --help print this usage information -n --no-lines do not print #line directives in generated C code (line numbers are not currently supported) -#debugging options: +debugging options: -g --debug perform all processing but do not write to any files "); pir::exit(0); Index: compilers/opsc/src/Ops/File.pm =================================================================== --- compilers/opsc/src/Ops/File.pm (revision 48695) +++ compilers/opsc/src/Ops/File.pm (working copy) @@ -311,13 +311,22 @@ 'VERSION'; } - my $version := pir::chopn__ssi(slurp($version_filename), 1); + grammar VERSION { + rule TOP { } + rule version { $=(\d+) '.' $=(\d+) '.' $=(\d+) } + } + + my $version := slurp($version_filename); + my $version_match := VERSION.parse($version); #say("# $version"); - my @bits := split('.', $version); - self := @bits[0]; - self := @bits[1]; - self := @bits[2]; - self := @bits; + self := +$version_match; + self := +$version_match; + self := +$version_match; + self := [ + +self, + +self, + +self, + ]; } # Local Variables: