Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parsing in prolog

Status
Not open for further replies.

convi

Programmer
Nov 22, 2012
1
IT
Hello guys,
I need some help with prolog code. I need to parse uri strings, in a way that
the predicate :

parsed_uri(URIString, URI).

is true if URIString is then dvided in the composed term :

URI = uri(Scheme, Userinfo, Host, Port, Path, Query, Fragment).

Example :

?- parsed_uri(” URI).
URI = uri(http, [], ’disco.unimib.it’, [], [], [], []).

If you guys give me some clues , it would be nice. I know that I have to use some finite state machine
or pushdown automata.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top