Mercurial > hg > xemacs-beta
comparison lisp/psgml/psgml-parse.el @ 74:54cc21c15cbb r20-0b32
Import from CVS: tag r20-0b32
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:04:33 +0200 |
parents | 131b0175ea99 |
children | c7528f8e288d |
comparison
equal
deleted
inserted
replaced
73:e2d7a37b7c8d | 74:54cc21c15cbb |
---|---|
1 ;;;; psgml-parse.el --- Parser for SGML-editing mode with parsing support | 1 ;;;; psgml-parse.el --- Parser for SGML-editing mode with parsing support |
2 ;; $Id: psgml-parse.el,v 1.1.1.1 1996/12/18 22:43:36 steve Exp $ | 2 ;; $Id: psgml-parse.el,v 1.1.1.2 1996/12/21 20:50:41 steve Exp $ |
3 | 3 |
4 ;; Copyright (C) 1994, 1995 Lennart Staflin | 4 ;; Copyright (C) 1994, 1995 Lennart Staflin |
5 | 5 |
6 ;; Author: Lennart Staflin <lenst@lysator.liu.se> | 6 ;; Author: Lennart Staflin <lenst@lysator.liu.se> |
7 ;; Acknowledgment: | 7 ;; Acknowledgment: |
463 token | 463 token |
464 (sgml-and-node-next dest))))))) | 464 (sgml-and-node-next dest))))))) |
465 (t ;state is a and-state | 465 (t ;state is a and-state |
466 (sgml-get-and-move state token)))) | 466 (sgml-get-and-move state token)))) |
467 | 467 |
468 (defsubst sgml-final (state) | |
469 (if (sgml-normal-state-p state) | |
470 (sgml-state-final-p state) | |
471 (sgml-final-and state))) | |
472 | |
468 (defun sgml-get-and-move (state token) | 473 (defun sgml-get-and-move (state token) |
469 ;; state is a and-state | 474 ;; state is a and-state |
470 (let ((m (sgml-get-move (sgml-and-state-substate state) token))) | 475 (let ((m (sgml-get-move (sgml-and-state-substate state) token))) |
471 (cond (m (cons m (cdr state))) | 476 (cond (m (cons m (cdr state))) |
472 ((sgml-final (sgml-and-state-substate state)) | 477 ((sgml-final (sgml-and-state-substate state)) |
500 (or (sgml-required-tokens (sgml-and-state-substate state)) | 505 (or (sgml-required-tokens (sgml-and-state-substate state)) |
501 (loop for s in (sgml-and-state-dfas state) | 506 (loop for s in (sgml-and-state-dfas state) |
502 nconc (sgml-tokens-of-moves (sgml-state-reqs s))) | 507 nconc (sgml-tokens-of-moves (sgml-state-reqs s))) |
503 (sgml-tokens-of-moves (sgml-state-reqs (sgml-and-state-next state)))))) | 508 (sgml-tokens-of-moves (sgml-state-reqs (sgml-and-state-next state)))))) |
504 | 509 |
505 | |
506 (defsubst sgml-final (state) | |
507 (if (sgml-normal-state-p state) | |
508 (sgml-state-final-p state) | |
509 (sgml-final-and state))) | |
510 | 510 |
511 (defun sgml-final-and (state) | 511 (defun sgml-final-and (state) |
512 (and (sgml-final (sgml-and-state-substate state)) | 512 (and (sgml-final (sgml-and-state-substate state)) |
513 (loop for s in (sgml-and-state-dfas state) | 513 (loop for s in (sgml-and-state-dfas state) |
514 always (sgml-state-final-p s)) | 514 always (sgml-state-final-p s)) |