Created
August 31, 2012 09:39
-
-
Save fperrad/3550875 to your computer and use it in GitHub Desktop.
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
diff -ru lib/Parse/Yapp/Grammar.pm lib/Parse/Yapp/Grammar.pm | |
--- lib/Parse/Yapp/Grammar.pm Sun Feb 11 16:29:31 2001 | |
+++ lib/Parse/Yapp/Grammar.pm Fri Jun 1 18:28:28 2007 | |
@@ -43,6 +43,20 @@ | |
########### | |
# Methods # | |
########### | |
+########################### | |
+# Method To View Terminal # | |
+########################### | |
+sub ShowTerminals { | |
+ my($self)=shift; | |
+ my($terminals) = $$self{GRAMMAR}{TERM}; | |
+ my($text); | |
+ | |
+ foreach (sort keys %{$terminals}) { | |
+ $text.=$_."\n" unless ($_ eq chr 0); | |
+ } | |
+ $text; | |
+} | |
+ | |
########################## | |
# Method To View Grammar # | |
########################## | |
diff -ru yapp yapp | |
--- yapp Sun Feb 11 16:30:29 2001 | |
+++ yapp Sun Jun 28 15:24:06 2009 | |
@@ -229,6 +229,8 @@ | |
and print OUT "Warnings:\n---------\n$tmp\n"; | |
$tmp=$parser->Conflicts() | |
and print OUT "Conflicts:\n----------\n$tmp\n"; | |
+ print OUT "Terminals:\n----------\n"; | |
+ print OUT $parser->ShowTerminals()."\n"; | |
print OUT "Rules:\n------\n"; | |
print OUT $parser->ShowRules()."\n"; | |
print OUT "States:\n-------\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment