Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
use v6;
use QAST:from<NQP>;
grammar COBOL::Grammar {
token statementlist($bootint) {
class COBOL::Actions {
method statementlist($/) {
make :op<say>, :value<awesome!!> ))
sub EXPORT(*@a) {
%*LANG<COBOL> := COBOL::Grammar;
%*LANG<COBOL-actions> := COBOL::Actions;
$*MAIN := 'COBOL';
$*W.install_lexical_symbol($*W.cur_lexpad(), '%?LANG', $*W.p6ize_recursive(%*LANG));
$*W.install_lexical_symbol($*W.cur_lexpad(), '$*MAIN', $*W.p6ize_recursive($*MAIN));
$*W.p6ize_recursive( nqp::hash() )
perl6 -I. -e 'use COBOL; ...'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment