- or download this
prod_op : term prod_op_[ $item[1] ]
prod_op_ : PROD <commit> term prod_op_[ [ $item[1], $arg[0], $item[2]
+] ]
| { $arg[0] }
- or download this
prod_op : term prod_op_[ $item[1] ]
prod_op_ : PROD <commit> term prod_op_[ [ $item[1], $arg[0], $item[2]
+] ]
| <error?: Expecting term following operator> <reject>
| { $arg[0] }
- or download this
4 * 5
...
ERROR (line 1): Expecting term following operator
>> no match
- or download this
use strict;
use warnings;
...
print("\n>> ", defined($parser->parse($text)) ? 'match' : 'no ma
+tch', "\n");
}
}