这是一个DFA简化和生成LL(1)分析表的程序,自动生成表格及图形

源代码在线查看: basic.t.svn-base

软件大小: 892 K
上传用户: maige49
关键词: DFA LL 程序
下载地址: 免注册下载 普通下载 VIP

相关代码

				# basic.t								use Test::Base;				use re::re;								plan tests => 1 * blocks();								run {				    my $block = shift;				    if (defined $block->re) {				        is( re::re->translate($block->re), $block->out, $block->name );				    }				}								__DATA__								=== TEST 1:				--- re				(a|b)*(aa|bb)(a|b)*				--- out				(a|b)*(aa|bb)(a|b)*																=== TEST 2:				--- re				abc				--- out				abc																=== TEST 3:				--- re				a|b|c				--- out				a|b|c																=== TEST 4:				--- re				((aa))*				--- out				(aa)*																=== TEST 5;				--- re				ab*c				--- out				ab*c																=== TEST 6:				--- re				a  (b| )*				--- out				a  (b| )*																=== TEST 7:				--- re				(a|)b*				--- out				(a|)b*																=== TEST 8:				--- re:				--- out:																=== TEST 9:				--- re				((()*))*				--- out				(()*)*							

相关资源