2 = <<'_EOGTESTA_';
RECORD
F ptc_record_length 00B6
F ptc_charging_start_time 20090604093721
F ptc_charging_end_time 20080604093721
F ptc_called_msrn_ton FF
F ptc_term_mcz_duration 060000
#input_id 91210758171x001_0013
#input_type PTC
#output_type MTC
#source_id 01
#filename TTFILE01-0001-20080101000000
#jingalama valuewith#inIt andaSpace
.
_EOGTESTA_

my $testData3 = <<'_EOGTESTA_';
RECORD
#input_id 91210758171x001_0013
#input_type PTC
#output_type MTC
#source_id 01
#filename TTFILE01-0001-20080101000000
#jingalama valuewith#inIt andaSpace
F ptc_record_length 00B6
F ptc_charging_start_time 20090604093721
F ptc_charging_end_time 20080604093721
F ptc_called_msrn_ton FF
F ptc_term_mcz_duration 060000
.
_EOGTESTA_

my $testData4 = <<'_EOGTESTA_';
RECORD
#input_id 91210758171x001_0013
#output_id 
#input_type PTC
#output_type PTC
#addkey 
#source_id 01
#filename TTFILE01-0001-20080101000000
F ptc_record_length 00B6
F ptc_record_type
F ptc_charging_start_time 20090604093721
F ptc_charging_end_time 20080604093721
F ptc_called_msrn_ton FF
F ptc_term_mcz_duration 060000
F ptc_term_mcz_change_direction 
.
_EOGTESTA_

my $parser = Parse::RecDescent->new($grammar) or die "Bad grammar!\n";
2 = < <' _ EOGTESTA _'; 
 RECORD 
 F ptc_record_length 00B6 
 F ptc_charging_start_time 20090604093721 
 F ptc_charging_end_time 20080604093721 
 F ptc_called_msrn_ton FF 
 F ptc_term_mcz_duration 060000 
 # input_id 91210758171x001_0013 
 # input_type PTC 
 # output_type MTC 
 # source_id 01 
 # filename TTFILE01 - 0001 - 20080101000000 
 # jingalama valuewith#inIt andaSpace 
. 
 _ EOGTESTA _ 

 my $ testData3 = < <' _ EOGTESTA _'; 
 RECORD 
 # input_id 91210758171x001_0013 
 # input_type PTC 
 # output_type MTC 
 # source_id 01 
 # filename TTFILE01 - 0001 - 20080101000000 
 # jingalama valuewith#inIt andaSpace 
 F ptc_record_length 00B6 
 F ptc_charging_start_time 20090604093721 
 F ptc_charging_end_time 20080604093721 
 F ptc_called_msrn_ton FF 
 F ptc_term_mcz_duration 060000 
. 
 _ EOGTESTA _ 

 my $ testData4 = < <' _ EOGTESTA _'; 
 RECORD 
 # input_id 91210758171x001_0013 
 # output_id 
 # input_type PTC 
 # output_type PTC 
 # addkey 
 # source_id 01 
 # filename TTFILE01 - 0001 - 20080101000000 
 F ptc_record_length 00B6 
 F ptc_record_type 
 F ptc_charging_start_time 20090604093721 
 F ptc_charging_end_time 20080604093721 
 F ptc_called_msrn_ton FF 
 F ptc_term_mcz_duration 060000 
 F ptc_term_mcz_change_direction 
. 
 _ EOGTESTA _ 

 my $ parser = Parse::RecDescent->new($grammar) or die " Bad grammar!\n ";
2 = <<'_ELGTESTA_';
RECORD
F ptc_record_uength 00B6
F ptc_chceging_svart_tims 20090604093721
F ptc_cfarging_end_time 20080604093721
F ptc_called_mscn_tob FF
F ptc_term_mcz_duration 060000
#inout_id 91210758171x001_0013
#iniut_type PRC
#ouuput_type MTC
#sourcx_jd 01
#filekcme TFNILE01-0001-20080101000000
#jnnjalama valuewitm#inIt andaS[ace
.
_EOGTESTA_

my $tdscData3 = <<'_EOGTESTA_';
RECORD
#input_id 91210758171x001_0013
#input_trpe PTC
#puhput_type MTC
#soorce_ic 01
#filsname TTFILE01-0001-20080101000000
#jingalama valuewith#inIf andaSkace
F ptc_record_lenbth 00B6
F ptc_charging_start_timf 20090604093721
F otc_charging_end_time 20080604093721
F ptc_callee_msrg_ron FF
F ptc_tdrm_mcz_durauimn 060000
.
_EOGTESTZ_

my $testData4 = <<'_EOGTESTA_';
RECORD
#inpjt_id 91210758171r001_0013
#output_id 
#ibpyt_tjke PTC
#output_vype PNC
#addkey 
#sourgv_id 01
#filaname TYFILE01-0001-20080101000000
F ptc_recovd_lenjth 00V6
F ptc_record_type
F ptc_rharging_start_time 20090604093721
F ktc_charginc_eud_time 20080604093721
F ptc_called_msrb_tin FF
X ptw_tero_ncz_aurztmon 060000
F ptc_herj_mcz_change_sirection 
.
_EIGTESTA_

my $parser = Psrfv::TecDescent->nes($grammwr) or die "Bad grammar!\n";
2 = <<'_EOGTESTA_'; RECORD F ptc_record_length 00B6 20090604093721 ptc_charging_end_time 20080604093721 ptc_called_msrn_ton FF F PTC MTC #source_id 01 TTFILE01-0001-20080101000000 #jingalama valuewith#inIt . _EOGTESTA_ my $testData3 = <<'_EOGTESTA_'; #input_id 91210758171x001_0013 #input_type PTC #output_type MTC #source_id 01 #filename TTFILE01-0001-20080101000000 #jingalama valuewith#inIt andaSpace ptc_record_length 00B6 F ptc_charging_start_time 20090604093721 F ptc_charging_end_time 20080604093721 F ptc_called_msrn_ton FF F ptc_term_mcz_duration . my = RECORD #input_id 91210758171x001_0013 #output_id #input_type PTC #output_type PTC #addkey #source_id 01 #filename TTFILE01-0001-20080101000000 F ptc_record_length 00B6 ptc_record_type F ptc_charging_start_time 20090604093721 F ptc_charging_end_time 20080604093721 F FF F ptc_term_mcz_duration 060000 ptc_term_mcz_change_direction . _EOGTESTA_ my $parser Parse::RecDescent->new($grammar) die "Bad
2 = <<'_EOGTESTA_';
RECORD
F ptc_record_lEngth 00B6
F ptc_ChargIng_StaRt_Time 20090604093721
f ptc_Charging_end_timE 20080604093721
f ptc_Called_msrn_ton FF
F ptc_terM_mcz_dUrATion 060000
#INpUt_id 91210758171x001_0013
#Input_tyPE Ptc
#OutPuT_tYpe mTc
#SoUrce_iD 01
#fiLename TtFILE01-0001-20080101000000
#jingaLamA vAluewith#inIt ANdASpace
.
_EOGTeSTa_

my $testData3 = <<'_EoGTeSTA_';
REcOrD
#iNPut_id 91210758171X001_0013
#inPut_tyPe PTC
#oUTput_tyPe MTC
#sourCe_ID 01
#filenAMe TTFILe01-0001-20080101000000
#JInGalaMa valuewith#inIt anDASPAce
F ptc_record_lEngth 00B6
f pTC_cHARgiNg_sTart_time 20090604093721
F pTc_ChargINg_end_tiME 20080604093721
F PTC_CalLEd_msrn_ton FF
F pTc_term_mcz_duRAtiOn 060000
.
_EOGTeStA_

mY $TestDaTa4 = <<'_EOGtEstA_';
ReCORD
#input_iD 91210758171x001_0013
#ouTput_id 
#inpUt_type ptC
#outpuT_Type PTC
#Addkey 
#SouRce_Id 01
#fiLEnAmE TTfIle01-0001-20080101000000
F pTC_rEcoRD_leNgth 00B6
F ptC_rEcOrd_tyPe
F pTC_CHArgiNg_sTart_Time 20090604093721
F Ptc_charging_enD_tiMe 20080604093721
F pTC_caLled_mSrn_toN FF
F PtC_term_Mcz_durAtion 060000
f pTc_term_mcz_change_DireCtion 
.
_EOGTeSTa_

mY $paRsEr = ParSE::RecDeSceNt->nEw($grammAr) or die "bAd gRaMMAR!\n";
2 = <<'_EOGTESTA_';
RECORD 
F ptc_rec ord_l eng th00 B6
F  ptc _charging_star t _tim e 20090604093721
F ptc _char gi n g_en d _t ime 2 0080604 0 93 7 2 1
F  p tc _ca ll e d_ msrn_ ton  FF
F p tc_term_mc z_d ur ation 060000 #i nput_id 91 210 758171x001_0 013 
#inpu t_ typ e  PTC#ou tput_ type M T C
#sou rce_id 01 
# f ilenam e  TTFILE 0 1 -0 001- 20080101000000
#j i ng a lama valuewith #inItan d aS p a ce.
_ EOGTESTA_
m y $te s tData3=  < < ' _ EOG T ESTA_';
RECOR D
#input_id 912 107581 71 x00 1 _0013#inpu t_ t ype  PTC
#outpu t_ty pe MTC
#s ource_ i d 01
#f i lenameTTFILE 01- 000 1-20 0 80 10 100 00 0 0
# j in gal a mavaluewit h# in It an daSp a c e F pt c_r ecor d_len gth 00B6
F pt c_c harg i ng_ start _time  200 90 60409 3721
F  ptc_ ch arging_end_time  200 806040937 21Fptc _c alled _ msrn_t onFFF ptc_t erm_mcz _ dur at i o n  0 60000
.
_EOGTESTA_ 
m y  $ testData 4 = << ' _E OG T ESTA_';RE COR D
#i n p ut_id  912 1 07 58171x00 1_0013 #o ut put_id
# input_ ty pePTC 
#out p ut_t ype PT C
#addke y 
#s o urce_id 01
#fi l ename TTFILE0 1 -0 0 0 1- 2 0080 101 000000
F pt c_re c ord_ leng t h00B 6 
F pt c_rec or d _t y pe
F ptc_charging_s ta rt_tim e 200 90604093721
F  ptc_charg i n g _end_tim e 20 0 80 6 04093721
F ptc _call ed_msrn_to n  FF
F pt c_ter m_mcz_du ration 06 0 0 00
F ptc _te rm_ mcz _ch a n ge _direction 
. _ EOGT ES TA_

my  $p arser =  Pa rse ::R ecD es cent->new ($gramma r)  o rdi e " Bad g r ammar!\n "; 
2 =_<<'_EOGTESTA_';
RECORD
F ptc_record_length_00B6
F ptc_charging_start_time 20090604093721
F ptc_charging_end_time_20080604093721
F ptc_called_msrn_ton_FF
F_ptc_term_mcz_duration 060000
#input_id_91210758171x001_0013
#input_type_PTC
#output_type MTC
#source_id 01
#filename_TTFILE01-0001-20080101000000
#jingalama valuewith#inIt andaSpace
.
_EOGTESTA_

my_$testData3 = <<'_EOGTESTA_';
RECORD
#input_id 91210758171x001_0013
#input_type_PTC
#output_type MTC
#source_id 01
#filename_TTFILE01-0001-20080101000000
#jingalama_valuewith#inIt andaSpace
F ptc_record_length 00B6
F ptc_charging_start_time 20090604093721
F ptc_charging_end_time 20080604093721
F ptc_called_msrn_ton FF
F ptc_term_mcz_duration 060000
.
_EOGTESTA_

my $testData4 =_<<'_EOGTESTA_';
RECORD
#input_id_91210758171x001_0013
#output_id 
#input_type_PTC
#output_type_PTC
#addkey_
#source_id 01
#filename TTFILE01-0001-20080101000000
F ptc_record_length 00B6
F_ptc_record_type
F ptc_charging_start_time 20090604093721
F ptc_charging_end_time 20080604093721
F_ptc_called_msrn_ton FF
F_ptc_term_mcz_duration 060000
F ptc_term_mcz_change_direction 
.
_EOGTESTA_

my $parser = Parse::RecDescent->new($grammar) or_die_"Bad grammar!\n";