unk1911 has asked for the wisdom of the Perl Monks concerning the following question:
$test = "$5.1"; $grammar = q { input: dollar decimal dollar : /\$/ { $item[1] } decimal : /[-+]?(\d+)?\.\d+/ { warn "decimal! $item[1]" } ...
i keep getting an error during a parse. does anyone see what i am doing wrong? if i replace $ with a % sign in the grammar and $test then everything works but the dollar is giving me a hard time. any help would be greatly appreciated. this sounds like a very trivial problem but i just don't see it.
-- http://unk1911.blogspot.com
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Parse::RecDescent and dollar sign
by Fletch (Bishop) on Jun 16, 2005 at 18:51 UTC | |
by unk1911 (Initiate) on Jun 16, 2005 at 18:58 UTC | |
|
Re: Parse::RecDescent and dollar sign
by ikegami (Patriarch) on Jun 16, 2005 at 19:58 UTC | |
|
Re: Parse::RecDescent and dollar sign
by kwaping (Priest) on Jun 16, 2005 at 18:57 UTC | |
by unk1911 (Initiate) on Jun 16, 2005 at 19:26 UTC |