cancel
Showing results for 
Search instead for 
Did you mean: 

help with perl source code

Ee Hong Toh
Occasional Advisor

help with perl source code

Hi ... i'm not familiar with perl language at all. i've come across this code while i was surfing the net.i was wondering whether is there anyone out there who knows the language and would be able to help me figure out what are we suppose to key in as the input.can i execute it using MS-DOS command ??? SOS!! thanks a lot for all the help.

 

 

 

P.S. This thread has been moved From Archived Desktops and Workstations Boards >Windows based > to Microsoft > general. -Hp forum moderator

knowledge is power!
6 REPLIES
Ron Kinner
Honored Contributor

Re: help with perl source code

You have to have perl running on your machine. You can download the source code from:

http://www.perl.com/pub/a/language/info/software.html

If you are lucky they already have a compiled binary for your OS at:

http://www.perl.com/CPAN/ports/index.html

Once you have perl then open a DOS window and cd to the folder where the convert.pl code lives and type:

perl convert.pl xxx.xxx

where xxx.xxx is a text file of rules. (If xxx.xxx is not in the same folder then use the full path) A rule is defined as some text, two tabs, and a probability.

Apparently the rules file would be generated by another program and all convert.pl does is change the format and generate a new file.

See http://www.compapp.dcu.ie/~acahill/final_year_project/source.html

and

http://www.compapp.dcu.ie/~acahill/final_year_project/funcspec.html#documentation

Ron

Ee Hong Toh
Occasional Advisor

Re: help with perl source code

first of all thank you for replying me. i was wondering whether you could help me change the code in such a way that the program will be calling the user to key in the input. the input will look like this:-
S -> ASA|aB;
A -> B|S;
B -> b|v;

*note: v is actually epsilon or could be a blank and ';' is to separte each rules.

do u think it's possible ?? thank you.
knowledge is power!
Ee Hong Toh
Occasional Advisor

Re: help with perl source code

or do u think u could tell me what are the input that i should key in for the earlier code? pcfg.pl where you can get the code from the website that you've pasted on.meaning if i can execute that pcfg.pl i will have the textfile in order to run the convert.pl right ? please do reply me as soon as possible because i need to know how does this run so that i can do my assignment. Thanks you.
knowledge is power!
Ee Hong Toh
Occasional Advisor

Re: help with perl source code

here is the code required to run pcfg.pl

transform.pl
knowledge is power!
Ee Hong Toh
Occasional Advisor

Re: help with perl source code

another code required.

parser.pl
knowledge is power!
Ee Hong Toh
Occasional Advisor

Re: help with perl source code

one last code required.

library.pl
knowledge is power!