15dfecf96Smrg;;
25dfecf96Smrg;; Copyright (c) 2002 by The XFree86 Project, Inc.
35dfecf96Smrg;;
45dfecf96Smrg;; Permission is hereby granted, free of charge, to any person obtaining a
55dfecf96Smrg;; copy of this software and associated documentation files (the "Software"),
65dfecf96Smrg;; to deal in the Software without restriction, including without limitation
75dfecf96Smrg;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
85dfecf96Smrg;; and/or sell copies of the Software, and to permit persons to whom the
95dfecf96Smrg;; Software is furnished to do so, subject to the following conditions:
105dfecf96Smrg;;
115dfecf96Smrg;; The above copyright notice and this permission notice shall be included in
125dfecf96Smrg;; all copies or substantial portions of the Software.
135dfecf96Smrg;;
145dfecf96Smrg;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
155dfecf96Smrg;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
165dfecf96Smrg;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
175dfecf96Smrg;; THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
185dfecf96Smrg;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
195dfecf96Smrg;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
205dfecf96Smrg;; SOFTWARE.
215dfecf96Smrg;;
225dfecf96Smrg;; Except as contained in this notice, the name of the XFree86 Project shall
235dfecf96Smrg;; not be used in advertising or otherwise to promote the sale, use or other
245dfecf96Smrg;; dealings in this Software without prior written authorization from the
255dfecf96Smrg;; XFree86 Project.
265dfecf96Smrg;;
275dfecf96Smrg;; Author: Paulo César Pereira de Andrade
285dfecf96Smrg;;
295dfecf96Smrg;;
305dfecf96Smrg;; $XFree86: xc/programs/xedit/lisp/modules/progmodes/sgml.lsp,v 1.2 2002/10/06 17:11:48 paulo Exp $
315dfecf96Smrg;;
325dfecf96Smrg
335dfecf96Smrg(require "syntax")
345dfecf96Smrg(in-package "XEDIT")
355dfecf96Smrg
365dfecf96Smrg;; Default property the text is shown.
375dfecf96Smrg(defsynprop *prop-sgml-default*
385dfecf96Smrg    "default"
395dfecf96Smrg    :font	"-*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-1"
405dfecf96Smrg    :foreground	"Gray10"
415dfecf96Smrg)
425dfecf96Smrg
435dfecf96Smrg(defsynprop *prop-sgml-default-short*
445dfecf96Smrg    "default-short"
455dfecf96Smrg    :font	"-*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-1"
465dfecf96Smrg    :foreground	"Gray10"
475dfecf96Smrg    :underline	t
485dfecf96Smrg)
495dfecf96Smrg
505dfecf96Smrg;; Large font.
515dfecf96Smrg(defsynprop *prop-sgml-sect*
525dfecf96Smrg    "sect"
535dfecf96Smrg    :font	"-*-helvetica-bold-r-*-*-17-*-*-*-*-*-*-1"
545dfecf96Smrg    :foreground	"Gray20"
555dfecf96Smrg)
565dfecf96Smrg
575dfecf96Smrg;; Monospaced property.
585dfecf96Smrg(defsynprop *prop-sgml-tt*
595dfecf96Smrg    "tt"
605dfecf96Smrg    :font	"-*-courier-medium-r-*-*-12-*-*-*-*-*-*-1"
615dfecf96Smrg    :foreground	"Black"
625dfecf96Smrg)
635dfecf96Smrg
645dfecf96Smrg;; Italic property.
655dfecf96Smrg(defsynprop *prop-sgml-it*
665dfecf96Smrg    "it"
675dfecf96Smrg    :font	"-*-helvetica-medium-o-*-*-12-*-*-*-*-*-*-1"
685dfecf96Smrg    :foreground	"Black"
695dfecf96Smrg)
705dfecf96Smrg
715dfecf96Smrg;; Bold font property.
725dfecf96Smrg(defsynprop *prop-sgml-bf*
735dfecf96Smrg    "bf"
745dfecf96Smrg    :font	"-*-helvetica-bold-r-*-*-12-*-*-*-*-*-*-1"
755dfecf96Smrg    :foreground	"Gray10"
765dfecf96Smrg)
775dfecf96Smrg
785dfecf96Smrg;; Looks like a link...
795dfecf96Smrg(defsynprop *prop-sgml-link*
805dfecf96Smrg    "link"
815dfecf96Smrg    :font	"-*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-1"
825dfecf96Smrg    :foreground	"blue"
835dfecf96Smrg    :underline	t
845dfecf96Smrg)
855dfecf96Smrg
865dfecf96Smrg;; Monospaced, also looks like a link...
875dfecf96Smrg(defsynprop *prop-sgml-email*
885dfecf96Smrg    "email"
895dfecf96Smrg    :font	"-*-courier-medium-r-*-*-12-*-*-*-*-*-*-1"
905dfecf96Smrg    :foreground	"blue"
915dfecf96Smrg    :underline	t
925dfecf96Smrg)
935dfecf96Smrg
945dfecf96Smrg;; Another monospaced property,
955dfecf96Smrg(defsynprop *prop-sgml-screen*
965dfecf96Smrg    "screen"
975dfecf96Smrg    :font	"-*-fixed-*-*-*-*-*-*-*-*-*-*-*-1"
985dfecf96Smrg    :foreground	"Gray10"
995dfecf96Smrg)
1005dfecf96Smrg
1015dfecf96Smrg(defsynprop *prop-sgml-maybe-entity*
1025dfecf96Smrg    "maybe-entity"
1035dfecf96Smrg    :font	"*lucidatypewriter-medium-r*-12-*"
1045dfecf96Smrg    :foreground	"VioletRed4"
1055dfecf96Smrg    :background	"LightYellow"
1065dfecf96Smrg)
1075dfecf96Smrg
1085dfecf96Smrg;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1095dfecf96Smrg;;  The macros sgml-syntoken and sgml-syntable allows creating rules for
1105dfecf96Smrg;; matching text inside tags in the format:
1115dfecf96Smrg;;	<tag> or <tag arg=value> or <tag arg1=value ... argn=value>
1125dfecf96Smrg;;		any-text
1135dfecf96Smrg;;	</tag>
1145dfecf96Smrg;;  The generated rules don't allow things like: < tag> or </tag >
1155dfecf96Smrg;;
1165dfecf96Smrg;;  This could also be done as a normal definition, with a starting rule like:
1175dfecf96Smrg;;	"<(tag1|tag2|tag3)\\>"
1185dfecf96Smrg;; and an ending rule like:
1195dfecf96Smrg;;	"</(tag1|tag2|tag3)>"
1205dfecf96Smrg;;  But is implemented in way that will fail on purpose for things like:
1215dfecf96Smrg;;	<tag1>any text</tag3></tag1>
1225dfecf96Smrg;;
1235dfecf96Smrg;; NOTE: These definitions aren't cheap in the time required to process the
1245dfecf96Smrg;;	file, and are just adaptations/tests with the syntax-highlight code,
1255dfecf96Smrg;;	probably it is better to avoid using it in other syntax definitions.
1265dfecf96Smrg;; NOTE2: It cannot be defined as a single macro because it is required to
1275dfecf96Smrg;;	  generate 2 entries in the main SGML syntax highlight definition,
1285dfecf96Smrg;;	  or, should generate the entire definition from a macro; you will
1295dfecf96Smrg;;	  need to type the tag name twice, but shouldn't be a problem if
1305dfecf96Smrg;;	  you are using sgml :-)
1315dfecf96Smrg;; XXX: Maybe the syntax-highlight code could save the starting match and
1325dfecf96Smrg;;	apply a regex generated at run-time to check for the ending tag,
1335dfecf96Smrg;;	but this probably would make the parser too slow, better to have
1345dfecf96Smrg;;	a specialized parser if that is required...
1355dfecf96Smrg;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1365dfecf96Smrg(defmacro sgml-syntoken (name)
1375dfecf96Smrg    `(syntoken (string-concat "<" ,name "\\>")
1385dfecf96Smrg	:icase t
1395dfecf96Smrg	:contained t
1405dfecf96Smrg	:begin (intern (string-concat ,name "$") 'keyword))
1415dfecf96Smrg)
1425dfecf96Smrg(defmacro sgml-syntable (name property)
1435dfecf96Smrg    `(let
1445dfecf96Smrg	(
1455dfecf96Smrg	(label (intern (string-concat ,name "$") 'keyword))
1465dfecf96Smrg	(nested-label (intern (string (gensym)) 'keyword))
1475dfecf96Smrg	)
1485dfecf96Smrg	(syntable label *prop-preprocessor* nil
1495dfecf96Smrg	    ;; tag is still open, process any options
1505dfecf96Smrg	    (synaugment :generic-tag)
1515dfecf96Smrg	    (syntoken ">"
1525dfecf96Smrg		:nospec t
1535dfecf96Smrg		:property *prop-preprocessor*
1545dfecf96Smrg		:begin nested-label)
1555dfecf96Smrg	    ;;	Generate a nested table that includes everything, and only
1565dfecf96Smrg	    ;; returns when the closing tag is found.
1575dfecf96Smrg	    (syntable nested-label ,property nil
1585dfecf96Smrg		(syntoken (string-concat "</" ,name ">")
1595dfecf96Smrg		    :icase t
1605dfecf96Smrg		    :nospec t
1615dfecf96Smrg		    :property *prop-preprocessor*
1625dfecf96Smrg		    :switch -2)
1635dfecf96Smrg		(synaugment :main)
1645dfecf96Smrg	    )
1655dfecf96Smrg	)
1665dfecf96Smrg    )
1675dfecf96Smrg)
1685dfecf96Smrg;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1695dfecf96Smrg;; Generate tokens for tags that don't require and ending tag.
1705dfecf96Smrg;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1715dfecf96Smrg(defmacro sgml-syntable-simple (name property)
1725dfecf96Smrg    `(let
1735dfecf96Smrg	(
1745dfecf96Smrg	(label (intern (string-concat ,name "$") 'keyword))
1755dfecf96Smrg	(nested-label (intern (string (gensym)) 'keyword))
1765dfecf96Smrg	)
1775dfecf96Smrg	(syntable label *prop-preprocessor* nil
1785dfecf96Smrg	    ;; tag is still open, process any options
1795dfecf96Smrg	    (synaugment :generic-tag)
1805dfecf96Smrg	    (syntoken ">"
1815dfecf96Smrg		:nospec t
1825dfecf96Smrg		:property *prop-preprocessor*
1835dfecf96Smrg		:begin nested-label)
1845dfecf96Smrg	    ;;	Generate a nested table that finishes whenever an unmatched
1855dfecf96Smrg	    ;; start or end tag is found.
1865dfecf96Smrg	    (syntable nested-label ,property nil
1875dfecf96Smrg		(syntoken "</"
1885dfecf96Smrg		    :icase t
1895dfecf96Smrg		    :nospec t
1905dfecf96Smrg		    :contained t
1915dfecf96Smrg		    :begin :simple-nested-tag)
1925dfecf96Smrg		;;  These will take precedence over other rules
1935dfecf96Smrg		(syntoken "<"
1945dfecf96Smrg		    :icase t
1955dfecf96Smrg		    :nospec t
1965dfecf96Smrg		    :contained t
1975dfecf96Smrg		    :begin :simple-nested-tag)
1985dfecf96Smrg		(syntoken "<p>"
1995dfecf96Smrg		    :icase t
2005dfecf96Smrg		    :nospec t
2015dfecf96Smrg		    :property *prop-preprocessor*
2025dfecf96Smrg		    :switch :main)
2035dfecf96Smrg		(synaugment :main)
2045dfecf96Smrg	    )
2055dfecf96Smrg	)
2065dfecf96Smrg    )
2075dfecf96Smrg)
2085dfecf96Smrg;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2095dfecf96Smrg;; Define some macros to generate tokens for tags in the format:
2105dfecf96Smrg;;	<tag/  ... /
2115dfecf96Smrg;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2125dfecf96Smrg(defmacro sgml-syntoken-short (name)
2135dfecf96Smrg    `(syntoken (string-concat "<" ,name "/")
2145dfecf96Smrg	:icase t
2155dfecf96Smrg	:property *prop-preprocessor*
2165dfecf96Smrg	:begin (intern (string-concat ,name "/") 'keyword))
2175dfecf96Smrg)
2185dfecf96Smrg(defmacro sgml-syntable-short (name property)
2195dfecf96Smrg    `(syntable (intern (string-concat ,name "/") 'keyword) ,property nil
2205dfecf96Smrg	(syntoken "/"
2215dfecf96Smrg	    :nospec t
2225dfecf96Smrg	    :property *prop-preprocessor*
2235dfecf96Smrg	    :switch -1)
2245dfecf96Smrg	(syntoken "</?\\w+>"
2255dfecf96Smrg	    :property *prop-control*
2265dfecf96Smrg	    :switch :main)
2275dfecf96Smrg    )
2285dfecf96Smrg)
2295dfecf96Smrg
2305dfecf96Smrg
2315dfecf96Smrg;; The main SGML syntax table
2325dfecf96Smrg(defsyntax *sgml-mode* :main *prop-sgml-default* nil nil
2335dfecf96Smrg    ;; Comments
2345dfecf96Smrg    (syntoken "<!--"
2355dfecf96Smrg	:nospec t
2365dfecf96Smrg	:contained t
2375dfecf96Smrg	:begin :comment)
2385dfecf96Smrg    (syntable :comment *prop-comment* nil
2395dfecf96Smrg	;; Only one rule, to finish the comment.
2405dfecf96Smrg	(syntoken "-->"
2415dfecf96Smrg	    :nospec t
2425dfecf96Smrg	    :switch -1)
2435dfecf96Smrg    )
2445dfecf96Smrg
2455dfecf96Smrg    ;; Entities
2465dfecf96Smrg    (syntoken "&[a-zA-Z0-9_.-]+;"
2475dfecf96Smrg	:property *prop-constant*)
2485dfecf96Smrg    ;; Probably an entity, missing ending `;'
2495dfecf96Smrg    (syntoken "&[a-zA-Z0-9_.-]+"
2505dfecf96Smrg	:property *prop-sgml-maybe-entity*)
2515dfecf96Smrg
2525dfecf96Smrg    ;; Strings
2535dfecf96Smrg    (syntable :string *prop-string* nil
2545dfecf96Smrg	;;  Ignore escaped characters.
2555dfecf96Smrg	(syntoken "\\\\.")
2565dfecf96Smrg	;;  Rule to finish the string.
2575dfecf96Smrg	(syntoken "\""
2585dfecf96Smrg	    :nospec t
2595dfecf96Smrg	    :switch -1)
2605dfecf96Smrg    )
2615dfecf96Smrg
2625dfecf96Smrg    ;; Links
2635dfecf96Smrg    (syntable :link *prop-preprocessor* nil
2645dfecf96Smrg	;; No link string following "url="
2655dfecf96Smrg	(syntoken ">"
2665dfecf96Smrg	    :nospec t
2675dfecf96Smrg	    :property *prop-control*
2685dfecf96Smrg	    :switch -1)
2695dfecf96Smrg	(syntoken "\""
2705dfecf96Smrg	    :nospec t
2715dfecf96Smrg	    :contained t
2725dfecf96Smrg	    :begin :link-string)
2735dfecf96Smrg	(syntable :link-string *prop-sgml-link* nil
2745dfecf96Smrg	    ;; Ignore escaped characters.
2755dfecf96Smrg	    (syntoken "\\\\.")
2765dfecf96Smrg	    ;; Rule to finish the link, note that returns two levels.
2775dfecf96Smrg	    (syntoken "\""
2785dfecf96Smrg		:nospec t
2795dfecf96Smrg		:switch -2)
2805dfecf96Smrg	)
2815dfecf96Smrg    )
2825dfecf96Smrg
2835dfecf96Smrg    ;; "Special" tag
2845dfecf96Smrg    (syntoken "<!"
2855dfecf96Smrg	:nospec t
2865dfecf96Smrg	:contained t
2875dfecf96Smrg	:begin :special-tag)
2885dfecf96Smrg    ;;  Rules for "special" tags
2895dfecf96Smrg    (syntable :special-tag *prop-preprocessor* nil
2905dfecf96Smrg	(syntoken "["
2915dfecf96Smrg	    :nospec t
2925dfecf96Smrg	    :property *prop-preprocessor*
2935dfecf96Smrg	    :begin :brackets)
2945dfecf96Smrg	;; Finish the "special" tag
2955dfecf96Smrg	(syntoken ">"
2965dfecf96Smrg	    :nospec t
2975dfecf96Smrg	    :switch -1)
2985dfecf96Smrg	(syntable :brackets *prop-sgml-default* nil
2995dfecf96Smrg	    (syntoken "]"
3005dfecf96Smrg		:nospec t
3015dfecf96Smrg		:property *prop-preprocessor*
3025dfecf96Smrg		:switch -1)
3035dfecf96Smrg	    ;; Allow nesting.
3045dfecf96Smrg	    (syntoken "["
3055dfecf96Smrg		:nospec t
3065dfecf96Smrg		:property *prop-preprocessor*
3075dfecf96Smrg		:begin :brackets)
3085dfecf96Smrg	    ;; Entities.
3095dfecf96Smrg	    (syntoken "%[a-zA-Z0-9_.-]+;?"
3105dfecf96Smrg		:property *prop-annotation*)
3115dfecf96Smrg	    ;;  Allow everything inside the brackets
3125dfecf96Smrg	    (synaugment :main)
3135dfecf96Smrg	)
3145dfecf96Smrg	;; Don't use generic tag tokens, only create a rule for strings
3155dfecf96Smrg	(syntoken "\""
3165dfecf96Smrg	    :nospec t
3175dfecf96Smrg	    :begin :string
3185dfecf96Smrg	    :contained t)
3195dfecf96Smrg	;; Allow everything inside the "special" tag
3205dfecf96Smrg	(synaugment :main)
3215dfecf96Smrg    )
3225dfecf96Smrg
3235dfecf96Smrg    ;; Some "short" tags
3245dfecf96Smrg    (sgml-syntoken-short "tt")
3255dfecf96Smrg    (sgml-syntable-short "tt" *prop-sgml-tt*)
3265dfecf96Smrg    (sgml-syntoken-short "it")
3275dfecf96Smrg    (sgml-syntable-short "it" *prop-sgml-it*)
3285dfecf96Smrg    (sgml-syntoken-short "bf")
3295dfecf96Smrg    (sgml-syntable-short "bf" *prop-sgml-bf*)
3305dfecf96Smrg    (sgml-syntoken-short "em")
3315dfecf96Smrg    (sgml-syntable-short "em" *prop-sgml-bf*)
3325dfecf96Smrg
3335dfecf96Smrg    ;; Short tag
3345dfecf96Smrg    (syntoken "<\\w+/"
3355dfecf96Smrg	:property *prop-preprocessor*
3365dfecf96Smrg	:begin :short-tag)
3375dfecf96Smrg    (syntable :short-tag *prop-sgml-default-short* nil
3385dfecf96Smrg	(syntoken "/"
3395dfecf96Smrg	    :nospec t
3405dfecf96Smrg	    :property *prop-preprocessor*
3415dfecf96Smrg	    :switch -1)
3425dfecf96Smrg	(syntoken "</?\\w+>"
3435dfecf96Smrg	    :property *prop-control*
3445dfecf96Smrg	    :switch -1)
3455dfecf96Smrg    )
3465dfecf96Smrg
3475dfecf96Smrg    ;;  Don't allow spaces, this may and may not be the start of a tag,
3485dfecf96Smrg    ;; but the syntax-highlight definition is not specialized...
3495dfecf96Smrg    (syntoken "<([^/a-zA-Z]|$)"
3505dfecf96Smrg	:property *prop-control*)
3515dfecf96Smrg
3525dfecf96Smrg    ;; Some tags that require an end tag
3535dfecf96Smrg    (sgml-syntoken "tt")
3545dfecf96Smrg    (sgml-syntable "tt" *prop-sgml-tt*)
3555dfecf96Smrg    (sgml-syntoken "code")
3565dfecf96Smrg    (sgml-syntable "code" *prop-sgml-tt*)
3575dfecf96Smrg    (sgml-syntoken "tag")
3585dfecf96Smrg    (sgml-syntable "tag" *prop-sgml-tt*)
3595dfecf96Smrg    (sgml-syntoken "verb")
3605dfecf96Smrg    (sgml-syntable "verb" *prop-sgml-tt*)
3615dfecf96Smrg    (sgml-syntoken "programlisting")
3625dfecf96Smrg    (sgml-syntable "programlisting" *prop-sgml-tt*)
3635dfecf96Smrg    (sgml-syntoken "it")
3645dfecf96Smrg    (sgml-syntable "it" *prop-sgml-it*)
3655dfecf96Smrg    (sgml-syntoken "bf")
3665dfecf96Smrg    (sgml-syntable "bf" *prop-sgml-bf*)
3675dfecf96Smrg    (sgml-syntoken "em")
3685dfecf96Smrg    (sgml-syntable "em" *prop-sgml-bf*)
3695dfecf96Smrg    (sgml-syntoken "mail")
3705dfecf96Smrg    (sgml-syntable "mail" *prop-sgml-email*)
3715dfecf96Smrg    (sgml-syntoken "email")
3725dfecf96Smrg    (sgml-syntable "email" *prop-sgml-email*)
3735dfecf96Smrg    (sgml-syntoken "screen")
3745dfecf96Smrg    (sgml-syntable "screen" *prop-sgml-screen*)
3755dfecf96Smrg    (sgml-syntoken "tscreen")
3765dfecf96Smrg    (sgml-syntable "tscreen" *prop-sgml-screen*)
3775dfecf96Smrg
3785dfecf96Smrg
3795dfecf96Smrg    ;;  Helper for tags that don't need an ending one.
3805dfecf96Smrg    ;;  NOTE: Since the parser is not specialized, if the tag is
3815dfecf96Smrg    ;;	      folowed by one that has a special property defined here,
3825dfecf96Smrg    ;;	      it may not be detected, i.e. put a <p> after the <sect>
3835dfecf96Smrg    ;;	      and it will work.
3845dfecf96Smrg    (syntable :simple-nested-tag *prop-preprocessor* nil
3855dfecf96Smrg	;; tag is still open, process any options
3865dfecf96Smrg	(synaugment :generic-tag)
3875dfecf96Smrg	(syntoken ">"
3885dfecf96Smrg	    :nospec t
3895dfecf96Smrg	    :property *prop-preprocessor*
3905dfecf96Smrg	    :switch -3)
3915dfecf96Smrg    )
3925dfecf96Smrg    (sgml-syntoken "sect")
3935dfecf96Smrg    (sgml-syntable-simple "sect" *prop-sgml-sect*)
3945dfecf96Smrg    (sgml-syntoken "sect1")
3955dfecf96Smrg    (sgml-syntable-simple "sect1" *prop-sgml-sect*)
3965dfecf96Smrg    (sgml-syntoken "sect2")
3975dfecf96Smrg    (sgml-syntable-simple "sect2" *prop-sgml-sect*)
3985dfecf96Smrg
3995dfecf96Smrg    ;; Generic tags
4005dfecf96Smrg    (syntoken "<"
4015dfecf96Smrg	:nospec t
4025dfecf96Smrg	:contained t
4035dfecf96Smrg	:begin :tag)
4045dfecf96Smrg    ;; Table :generic-tag is defined to be augmented, no rule to finish it.
4055dfecf96Smrg    (syntable :generic-tag *prop-preprocessor* nil
4065dfecf96Smrg	;; Start string
4075dfecf96Smrg	(syntoken "\""
4085dfecf96Smrg	    :nospec t
4095dfecf96Smrg	    :begin :string
4105dfecf96Smrg	    :contained t)
4115dfecf96Smrg	;; Start url link
4125dfecf96Smrg	(syntoken "url="
4135dfecf96Smrg	    :nospec t
4145dfecf96Smrg	    :begin :link)
4155dfecf96Smrg	;; Cannot nest
4165dfecf96Smrg	(syntoken "<"
4175dfecf96Smrg	    :nospec t
4185dfecf96Smrg	    :property *prop-control*)
4195dfecf96Smrg    )
4205dfecf96Smrg    (syntable :tag *prop-preprocessor* nil
4215dfecf96Smrg	;; Finish the tag
4225dfecf96Smrg	(syntoken ">"
4235dfecf96Smrg	    :nospec t
4245dfecf96Smrg	    :switch -1)
4255dfecf96Smrg	;; Import generic definitions
4265dfecf96Smrg	(synaugment :generic-tag)
4275dfecf96Smrg    )
4285dfecf96Smrg)
429