Index: /trunk/PS-IPP-Metadata-Config/lib/PS/IPP/Metadata/Config.pm
===================================================================
--- /trunk/PS-IPP-Metadata-Config/lib/PS/IPP/Metadata/Config.pm	(revision 3453)
+++ /trunk/PS-IPP-Metadata-Config/lib/PS/IPP/Metadata/Config.pm	(revision 3454)
@@ -1,5 +1,5 @@
 # Copyright (c) 2005  Joshua Hoblitt
 #
-# $Id: Config.pm,v 1.5 2005-03-18 22:12:45 jhoblitt Exp $
+# $Id: Config.pm,v 1.6 2005-03-18 23:38:05 jhoblitt Exp $
 
 package PS::IPP::Metadata::Config;
@@ -43,7 +43,4 @@
     #print Dumper($tree);
     
-    # remove comment only lines
-    $self->_strip_comments( $tree ) or return undef;
-
     # handle multi-symbol lines
     $self->_merge_multi_symbols( $tree ) or return undef;
@@ -54,33 +51,4 @@
 
     return $tree;
-}
-
-sub _strip_comments {
-    my ( $self, $tree ) = @_;
-
-    # Iteratate through the parse tree and remove the hashes that have a
-    # class key equal to "comment_line".
-    for (my $i = 0; $i < @{$tree}; $i++) {
-        my $elem = $tree->[$i];
-
-        # recurse through nested metadata
-        if ( $elem->{class} eq "metadata" ) {
-            $self->_strip_comments( $elem->{value} );
-        }
-
-        # stop if the prevous pass removed the last element and called redo
-        last unless defined $elem;
-
-        if ( $elem->{class} =~ /comment_line|blank_line/ ) {
-            # delete element from array
-            splice @$tree, $i, 1;
-
-            # the list just got shorter by one element so we don't want to
-            # increment the cursor
-            redo;
-        }
-    }
-
-    return 1;
 }
 
@@ -192,5 +160,5 @@
 grammar:
     statement(s)
-        { $item[1] }
+        {[ grep $_->{class} !~ /(comment_line|blank_line)/, @{$item[1]} ]}
 
 statement:
