Skip to content

Instantly share code, notes, and snippets.

@arafatkamaal
arafatkamaal / repl demonstration
Created April 25, 2013 03:44
A super crude REPL for perl
$ cat repl.pl
use strict;
use warnings;
while(<STDIN>)
{
@arafatkamaal
arafatkamaal / Grammar question
Created March 14, 2013 09:07
Question regarding Perl 6 Grammars
A question regarding Perl 6 Grammars.
I know that Jonathan has created something called as Grammar::Tracer[He has a talk on this: http://www.jnthn.net/papers/2011-yapceu-grammars.pdf], which basically does [as he mentions in the talk]
a. Gives us a trace of all the various rules that our grammar calls as it tries to match.
b. Indicates whether the rule matched or not
c. When it matches, includes the string that was matched.
Now as far as I understand, Perl 6 programs are parsed by a grammar written in Perl 6. In other words, the Perl 6 program is the input data to the Perl 6 grammar.