|
-
string translation problem
First off I'm really new to Java so please bear with me. I need to translate a line of text from one form to another. An example line segment has the following format:
" step(sent(1,A,B,vars(Na,Rv,ped(pk(B),cat(N
a,A)))))"
This means that at step 1, A sends to B that which is contained in vars() i.e. Na, Rv and encryption of Na and A (concatenated) using B's public key [ped(pk(B),cat(Na,A))]
The output format I need is the following:
"Knows_B,time_1(Received(B,time_1,(Na,Rv,enc({Na,A},pk_B))))" (ii)
Basically this is the same information that is in the input format but I just need to translate it to the output format above. From what I've read I think i need to use string tokenisers to separate out the input format and thus build up the output form. However I really am at a loss as to how to begin coding this translation. If anyone has the time could they perhaps give me an example of some code that might solve this problem.
If anyone needs more information regarding the input format and how it's related to the output format I will try and elaborate some more on their connection.
Thanks a million.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks