;ELC ;;; Compiled ;;; in Emacs version 27.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'ebnf-otz) #@44 Value returned by `ebnf-dtd-lex' function. (defvar ebnf-dtd-lex nil (#$ . 428)) #@13 DTD parser. (defalias 'ebnf-dtd-parser #[(start) " ZT S`\306\211\211\211 b\210\307 \211\310=\203%\311\312!\210\313\f!\211@\314=\204\210\fA\f@\f\n=\204k\315`Z\316_\245\317\320\"\"\266\321\f!\211A\f@ \2036\322 !\2046 B\2026\n\310=\204|\307 \323=\204|\311\324!\210\315\325\317\320\"\"\266b\210 .\207" [ebnf-limit start the-end rule token rule-list nil ebnf-dtd-lex end-of-input error "Empty DTD file" ebnf-dtd-prolog end-prolog "Parsing...%s%%" 100.0 message format ebnf-dtd-intsubset ebnf-add-empty-rule-list end-decl "Missing end of DOCTYPE" 100.0 origin bias total ebnf-message-float] 8 (#$ . 514)]) (defalias 'ebnf-dtd-prolog #[(token) "\302=\203, \303\230\203,\304\301 \305\306\307$\310\311\312\313$\310\314\315\316$\211\317=\204,\320\321!\210\322\301 !\211\323\267\202V\301 \324=\204B\320\325!\210\326 \327=\203N\301 \202O\330\331B\207\332B\207\333\207" [token ebnf-dtd-lex begin-pi "xml" ebnf-dtd-attribute version-attr "^1\\.0$" "XML version" ebnf-dtd-attribute-optional encoding-attr "^[A-Za-z][-A-Za-z0-9._]*$" "XML encoding" standalone-attr "^yes|no$" "XML standalone" end-pi error "Missing end of XML processing instruction" ebnf-dtd-pi #s(hash-table size 5 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (doctype-decl 55 element-decl 82 attlist-decl 82 entity-decl 82 notation-decl 82)) name "Document type name is missing" ebnf-dtd-externalid begin-subset end-prolog end-subset end-of-input (end-prolog . end-subset)] 6]) (defalias 'ebnf-dtd-attribute #[(token attr match attr-name) " =\204 \304\305\n\"\210\306 \n$\207" [token attr attr-name match error "%s attribute is missing" ebnf-dtd-attribute-optional] 5]) (defalias 'ebnf-dtd-attribute-optional #[(token attr match attr-name) " =\203#\303 \305=\203\303 \306=\203\307\n \"\204 \310\311\f\"\210\303 \207" [token attr match ebnf-dtd-lex attr-name equal string string-match error "XML %s attribute is invalid"] 3]) (defalias 'ebnf-dtd-externalid #[(&optional token) "\204 \302 \303\267\202\304 \202'\305 \210\304 \202' \203&\306\307!\202')\207" [token must-have ebnf-dtd-lex #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (system 15 public 20)) ebnf-dtd-systemliteral ebnf-dtd-pubidliteral error "Missing `SYSTEM' or `PUBLIC' in external id"] 2]) (defalias 'ebnf-dtd-systemliteral #[nil "\300 \301=\204 \302\303!\210\300 \207" [ebnf-dtd-lex string error "System identifier is invalid"] 2]) (defalias 'ebnf-dtd-pubidliteral #[nil "\300 \301=\203\302\303\"\206\304\305!\207" [ebnf-dtd-lex string string-match "^[-'()+,./:=?;!*#@$_%\n a-zA-Z0-9]*$" error "Public identifier is invalid"] 3]) (defalias 'ebnf-dtd-pi #[(token) "\302=\203\303\304 \"\203\305\306!\210\301 \307=\203\301 \211\202\207" [token ebnf-dtd-lex begin-pi string-match "^[xX][mM][lL]$" error "Processing instruction name can not be `XML'" end-pi] 4]) (defalias 'ebnf-dtd-intsubset #[(token) "\301=\203\n\302!\303\267\202%\304B\207\305 \304B\207\306 \207\307 \207\310 \207\311 \207\312\313!\207" [token begin-pi ebnf-dtd-pi #s(hash-table size 7 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (end-subset 16 end-of-input 16 pe-ref 20 element-decl 25 attlist-decl 28 entity-decl 31 notation-decl 34)) nil ebnf-dtd-lex ebnf-dtd-elementdecl ebnf-dtd-attlistdecl ebnf-dtd-entitydecl ebnf-dtd-notationdecl error "Invalid DOCTYPE element"] 2]) (defalias 'ebnf-dtd-elementdecl #[nil "\306\211\211\306\305 \303=\204\307\310!\210 \305 \211\311\267\202B\312 !\305 )B\202E\305 \211\313=\203<\314 \202E\315\n!\202E\307\316!\211@\317=\204Q\307\320!\210\321 !\210\305 \322 A\f#,B\207" [ebnf-action body token name action ebnf-dtd-lex nil error "Invalid ELEMENT name" #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (empty 32 any 32 begin-group 46)) ebnf-make-terminal pcdata ebnf-dtd-mixed ebnf-dtd-children "Invalid ELEMENT content" end-decl "Missing `>' in ELEMENT declaration" ebnf-eps-add-production ebnf-make-production term] 6]) (defalias 'ebnf-dtd-mixed #[nil "\304!\305B\300 \211\306=\n\306=\203)\300 \307=\204\310\311!\210 B\300 \211\202\n\312=\2043\310\313!\210 \203B\300 \314=\204B\310\315!\210\316 \300 \305B\"+\207" [ebnf-dtd-lex alt token has-alternative ebnf-make-terminal nil alternative name error "Invalid name" end-group "Missing `)'" zero-or-more "Missing `*'" ebnf-token-alternative] 5]) (defalias 'ebnf-dtd-children #[(token) "\301\302!!\207" [token ebnf-dtd-operators ebnf-dtd-choice-seq] 3]) (defalias 'ebnf-dtd-choice-seq #[(token) "\302!\303@\304=\203*@\304=\203\"A B\302\305 !\211\202\306 \"\202S@\307=\203P@\307=\203FA B\302\305 !\211\2022\310A B!\202SA@\311=\204^\312\313!\210 )\207" [token elist ebnf-dtd-cp nil alternative ebnf-dtd-lex ebnf-token-alternative comma ebnf-token-sequence end-group error "Missing `)' in ELEMENT content"] 4]) (defalias 'ebnf-dtd-cp #[(token) "\302\303\267\202\304 !\202\305\301 !\202\306\307!!\207" [token ebnf-dtd-lex ebnf-dtd-operators #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (name 7 begin-group 13)) ebnf-make-terminal ebnf-dtd-choice-seq error "Invalid element"] 3]) (defalias 'ebnf-dtd-operators #[(elm) "\302 \211\303\267\202$\302 \304 !B\202'\302 \305 !B\202'\302 \306 !B\202' B)\207" [token elm ebnf-dtd-lex #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (optional 9 zero-or-more 18 one-or-more 27)) ebnf-token-optional ebnf-make-zero-or-more ebnf-make-one-or-more] 4]) (defalias 'ebnf-dtd-attlistdecl #[nil "\301 \302=\204 \303\304!\210\305\301 \211\302=\203j\301 \211\306\267\202:\301 \307=\204*\303\310!\210\311\312\313\"\210\202D\311\314\315\"\210\202D\316>\204D\303\317!\210\301 \211\320>\204 \321=\203V\301 \322=\203c\323\324 \"\204 \303\325!\210\202 \326=\204t\303\327!\210\301 )\305B\207" [token ebnf-dtd-lex name error "Invalid ATTLIST name" nil #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (notation 31 begin-group 50)) begin-group "Missing `(' in NOTATION type in ATTLIST declaration" ebnf-dtd-namelist "NOTATION" (name) "enumeration" (name name-char) (cdata id idref idrefs entity entities nmtoken nmtokens) "Invalid type in ATTLIST declaration" (required implied) fixed string string-match "^\\(&\\([A-Za-z_:][-A-Za-z0-9._:]*\\|#\\(x[[:xdigit:]]+\\|[0-9]+\\)\\);\\|[^<&]\\)*$" "Invalid default value in ATTLIST declaration" end-decl "Missing `>' in end of ATTLIST"] 4]) (defalias 'ebnf-dtd-namelist #[(type name-list) "\303\304 >\204\305\306\n\"\210\304 \211\307=\204\310=\206!\305\311\n\")\207" [token name-list type nil ebnf-dtd-lex error "Invalid name in %s type in ATTLIST declaration" alternative end-group "Missing `)' in %s type in ATTLIST declaration"] 3]) (defalias 'ebnf-dtd-entitydecl #[nil "\302 \211\303=\211\203\302 \304=\204\305\306!\210\302 \211\307=\2035\310\311\n\"\203.\302 \202Q\305\312!\210\202Q\313! \204Q\314=\203Q\302 \304=\204N\305\315!\210\302 \316=\204[\305\317!\210\302 *\320B\207" [token pedecl ebnf-dtd-lex percent name error "Invalid name of ENTITY" string string-match "^\\(%[A-Za-z_:][-A-Za-z0-9._:]*;\\|&\\([A-Za-z_:][-A-Za-z0-9._:]*\\|#\\(x[[:xdigit:]]+\\|[0-9]+\\)\\);\\|[^%&]\\)*$" "Invalid ENTITY definition" ebnf-dtd-externalid ndata "Invalid NDATA name" end-decl "Missing `>' in end of ENTITY" nil] 4]) (defalias 'ebnf-dtd-notationdecl #[nil "\300 \301=\204 \302\303!\210\304 \305=\204\302\306!\210\300 \307B\207" [ebnf-dtd-lex name error "Invalid name NOTATION" ebnf-dtd-externalid-or-publicid end-decl "Missing `>' in end of NOTATION" nil] 2]) (defalias 'ebnf-dtd-externalid-or-publicid #[nil "\301 \211\302\267\202!\303 \202$\304 \210\301 \211\305=\203\301 \202$\306\307!)\207" [token ebnf-dtd-lex #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (system 9 public 14)) ebnf-dtd-systemliteral ebnf-dtd-pubidliteral string error "Missing `SYSTEM' or `PUBLIC'"] 3]) #@51 Vector used to map characters to a lexical token. (defconst ebnf-dtd-token-table (make-vector 256 'error) (#$ . 8649)) #@30 Initialize EBNF token table. (defalias 'ebnf-dtd-initialize #[nil "\302\211\303W\203 \304I\210T\211\202\305\211\306W\203( \307I\210T\211\202\310\211\311W\203< \307I\210T\211\202+\312\211\313W\203P \307I\210T\211\202? \314\307I\210 \303\307I\210 \315\304I\210 \316\304I\210 \317\320I\210 \321\320I\210 \322\320I\210 \323\320I\210 \324\325I\210 \326\327I\210 \330\331I\210 \332\333I\210 \334\335I\210 \336\337I\210 \340\341I\210 \342\343I\210 \344\345I\210 \346\347I\210 \350\351I\210 \352\353I\210 \354\355I\210 \356\357I\210 \360\361I\210 \306\362I\210 \363\364I)\207" [char ebnf-dtd-token-table 48 58 name-char 65 91 name 97 123 160 256 95 46 45 10 space 13 9 32 61 equal 44 comma 42 zero-or-more 43 one-or-more 124 alternative 37 percent 38 ampersand 35 hash 63 interrogation 34 double-quote 39 single-quote 60 less-than 62 end-decl 40 begin-group 41 end-group begin-subset 93 end-subset] 4 (#$ . 8774)]) (defconst ebnf-dtd-name-chars (ebnf-range-regexp "-._:0-9A-Za-z" 160 255)) (defconst ebnf-dtd-decl-alist '(("ATTLIST" . attlist-decl) ("DOCTYPE" . doctype-decl) ("ELEMENT" . element-decl) ("ENTITY" . entity-decl) ("NOTATION" . notation-decl))) (defconst ebnf-dtd-element-alist '(("#FIXED" . fixed) ("#IMPLIED" . implied) ("#PCDATA" . pcdata) ("#REQUIRED" . required))) (defconst ebnf-dtd-name-alist '(("ANY" . any) ("CDATA" . cdata) ("EMPTY" . empty) ("ENTITIES" . entities) ("ENTITY" . entity) ("ID" . id) ("IDREF" . idref) ("IDREFS" . idrefs) ("NDATA" . ndata) ("NMTOKEN" . nmtoken) ("NMTOKENS" . nmtokens) ("NOTATION" . notation) ("PUBLIC" . public) ("SYSTEM" . system) ("encoding" . encoding-attr) ("standalone" . standalone-attr) ("version" . version-attr))) #@100 Lexical analyzer for DTD. Return a lexical token. See documentation for variable `ebnf-dtd-lex'. (defalias 'ebnf-dtd-lex #[nil "`Y\203\306\207\307g\310V\203\311\202>\ngH\211\312=\203)\313w\210`W\202; \314=\203:\315\316!\203:\317 \202;\307\204\n`Y\203H\306\202' \320\267\202#\311\321!\202'\307u\210g\211\322U\203j\307u\210\323\f!\324\202\217 \325U\203\213\307u\210\323\f!1\32612\"A\206\207\311\3271\")\202\217\311\330 \")\202'\323\f!\326 3\"A\206' \202'\307u\210g\331U\204\261\332\202'\307u\210\333\202'\307u\210\334\323\f!P\326 4\"A\206'\311\335 \"\202'\336\337!\340\202'\336\341!\340\202'\307u\210\315\342!\203\356\343\202'\344\345!\346\202'\307u\210g\347U\204\344\350!\351\202'\307u\210g\352U\204\353\354\355\"\202\307u\210\353\356\357\"\360\202'\307u\210 )\207" [ebnf-limit token ebnf-dtd-token-table char ebnf-dtd-name-chars ebnf-dtd-lex end-of-input nil 255 error space " \n " less-than looking-at "" "-" nil 3 t error "Invalid character"] 2]) (defalias 'ebnf-dtd-eps-filename #[nil "\303u\210\303\211\304 !P`\nW\203'g\305U\203'\306\307!\204'\304\310!P\211\202)\207" [fname ebnf-dtd-filename-chars ebnf-limit nil ebnf-buffer-substring 45 looking-at "-->" "-"] 4]) (provide 'ebnf-dtd)