Re: Problem using a module containing a grammar

2013-03-25 Thread Brandon Allbery
On Mon, Mar 25, 2013 at 11:01 AM, wrote: > grammar SalesExportGram is export { (...) > my $parsed = SalesReportGram.parsefile('sales_report.txt'); > Might help if you used the same name in both places? -- brandon s allbery kf8nh sine nomine associates allber...

[perl6/specs] eac99e: Twigil in a BUILD call must be '!'

2013-03-25 Thread GitHub
Branch: refs/heads/master Home: https://github.com/perl6/specs Commit: eac99e23ec9416e07735c16f948d11c5397ea62d https://github.com/perl6/specs/commit/eac99e23ec9416e07735c16f948d11c5397ea62d Author: Stéphane Payrard Date: 2013-03-25 (Mon, 25 Mar 2013) Changed paths: M S

Re: Problem using a module containing a grammar

2013-03-25 Thread raiph mellor
On Mon, Mar 25, 2013 at 11:01 AM, wrote: > I have created a file called SalesReport.mp6, which contains a grammar > > module SalesReport; > grammar SalesExportGram is export { Aiui you can now use this module to introduce SalesReport as a module name and SalesExportGram as a grammar name

Re: Problem using a module containing a grammar

2013-03-25 Thread phiroc
If I give the module (SalesReport.pm6) and the grammar declared in it (grammar SalesReport) the same name, I get a "no such method 'parsefile' for invocant of type 'SalesReport'" error, when the following lines are run: use lib '.'; use SalesReport; my $parsed = SalesReport.parsefile('sale

Problem using a module containing a grammar

2013-03-25 Thread phiroc
Hello, I have created a file called SalesReport.mp6, which contains a grammar - module SalesReport; grammar SalesExportGram is export { token TOP { ^ + $ } token country { \n +