in reply to Re^5: Help with Parse::RecDescent grammar
in thread Help with Parse::RecDescent grammar
I changed the code to return $item[3] and I now get a nice looking structure. One thing I notice is when I try to parse multiple entries, I get the bad netlist error again. For example:
Consider my data is the following:
my $text = <<'_EOT_'; dbSetCellPortTypes "/opt/mylib/s956M" "blahblah" '( ("gnd!" "Inout" "Ground" ) ("vint!" "Inout" "Power" ) ) #f dbSetCellPortTypes "/opt/mylib/s956M" "newCell" '( ("gnd!" "Inout" "Ground" ) ("vint!" "Inout" "Power" ) ) #f _EOT_
I've tried changing the parse rule to the following as well:
parse : <skip:'(?:\s*(?:#[^\n]*)?)'> portDef(s?) /\Z/ { $item[2] }
What is the /\Z/ doing actually?
Thanks,
Frank
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Help with Parse::RecDescent grammar
by ikegami (Patriarch) on Dec 13, 2006 at 16:47 UTC | |
by dramguy (Novice) on Dec 13, 2006 at 17:29 UTC | |
by ikegami (Patriarch) on Dec 13, 2006 at 17:46 UTC |