/* * url.jape * * Copyright (c) 1998-2001, The University of Sheffield. * * This file is part of GATE (see http://gate.ac.uk/), and is free * software, licenced under the GNU Library General Public License, * Version 2, June 1991 (in the distribution as file licence.html, * and also available at http://gate.ac.uk/gate/licence.html). * * Diana Maynard, 02 Aug 2001 * * $Id: url.jape,v 1.1 2004/09/10 13:33:24 akshay Exp $ */ Phase: Url Input: Lookup SpaceToken Token UrlPre Options: control = appelt // Url Rules // http://www.amazon.com // ftp://amazon.com // www.amazon.com Rule: Url1 Priority: 50 ( {UrlPre} ({Token})* ):urlAddress ({SpaceToken}) --> :urlAddress.Url = {kind = "urlAddress", rule = "Url1"} Rule: UrlContext Priority: 20 ( {Token.string == "at"} {Token.string == ":"} ) ( ({Token.orth == lowercase} | {Token.orth == upperInitial} | {Token.kind == number} | {Token.kind == punctuation} | {Token.kind == symbol} | {Token.string == "."})+ {Token.string == "."} ({Token.orth == lowercase} | {Token.orth == upperInitial} | {Token.kind == number} | {Token.kind == punctuation} | {Token.kind == symbol} | {Token.string == "/"} | {Token.string == "."})* ) :urlAddress --> :urlAddress.Url = {kind = "urlAddress", rule = "UrlContext"}