This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1: Program | |
# 2: Statement | |
# 3: VariableStatement | |
# 3: VAR: 'var' @0:3 | |
# 3: IDENTIFIER: 'i' @4:5 | |
# 3: ASSIGN: '=' @6:7 | |
# 3: DECIMALLITERAL: '0' @8:9 | |
# 2: Statement | |
# 3: ExpressionStatement | |
# 3: IDENTIFIER: 'i' @11:12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1..7 | |
G1 S0 :start -- Internal G1 start symbol | |
G1 S1 Input | |
G1 S2 Statement | |
G1 S3 SEPARATOR | |
G1 S4 CREATE | |
G1 S5 TypeDef | |
G1 S6 METRIC | |
G1 S7 ID_METRIC | |
G1 S8 AS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use 5.010; | |
use strict; | |
use warnings; | |
use Test::More tests => 3; | |
use Marpa::R2; | |
use Data::Dumper; | |
$Data::Dumper::Indent = 0; | |
$Data::Dumper::Terse = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ambiguous parse: 5 alternatives. | |
# Alternative 1: | |
['Expr',['Expr',['Expr',['Expr',['Number','2']],'**',['Expr',['Number','7']]],'-',['Expr',['Number','3']]],'**',['Expr',['Number','10']]] | |
# Alternative 2: | |
['Expr',['Expr',['Expr',['Number','2']],'**',['Expr',['Expr',['Number','7']],'-',['Expr',['Number','3']]]],'**',['Expr',['Number','10']]] | |
# Alternative 3: | |
['Expr',['Expr',['Number','2']],'**',['Expr',['Expr',['Expr',['Number','7']],'-',['Expr',['Number','3']]],'**',['Expr',['Number','10']]]] | |
# Alternative 4: | |
['Expr',['Expr',['Number','2']],'**',['Expr',['Expr',['Number','7']],'-',['Expr',['Expr',['Number','3']],'**',['Expr',['Number','10']]]]] | |
# Alternative 5: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# Adapted from tutorial Copyright (c) 2013 Peter Stuifzand | |
# at http://marpa-guide.github.io/chapter3.html | |
# In particular this is an attempt at Exercise 3 | |
use strict; | |
use warnings; | |
package Authorization; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# Adapted from tutorial Copyright (c) 2013 Peter Stuifzand | |
# at http://marpa-guide.github.io/chapter3.html | |
# In particular this is an attempt at Exercise 3 | |
use strict; | |
use warnings; | |
package Authorization; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use 5.010; | |
use strict; | |
use warnings; | |
use Marpa::R2; | |
use Getopt::Long; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\[ | |
'scutil', | |
'scutil', | |
'> open', | |
'> show', | |
[ | |
'path', | |
'State:/Network/Service/0F70B221-EEF7-4ACC-96D8-ECBA3A15F132/IPv4' | |
], | |
'<dictionary>', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
assert(2^-2 == 1/4 and -2^- -2 == - - -4); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use 5.010; | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
$Data::Dumper::Indent = 0; | |
$Data::Dumper::Terse = 1; | |
$Data::Dumper::Deepcopy = 1; | |
use Marpa::R2; |
NewerOlder