Lines Matching defs:syntax
30 ;; $XFree86: xc/programs/xedit/lisp/modules/syntax.lsp,v 1.11 2003/01/16 03:50:46 paulo Exp $
33 (provide "syntax")
37 (defvar *syntax-symbols* '(
38 syntax-highlight defsyntax defsynprop synprop-p syntax-p
44 (export *syntax-symbols*)
46 (dolist (symbol xedit::*syntax-symbols*)
50 (makunbound '*syntax-symbols*)
74 such syntax tables, due to the extra time building the environment to
76 complex syntax, for example, a man page source file.
88 syntax-highlight, if the text property has a background attribute,
123 ;; Initialize some default properties that may be shared in syntax
188 ;; The "main" definition of the syntax highlight coding interface.
190 ;; it an already compiled syntax table.
198 (compile-syntax-table
210 ;; (defsynoptions *my-syntax-options*
234 ;; syntax table.
238 ;; beginning a new syntax table.
241 ;; A keyword -> switch to the syntax table
252 ;; popped until the named syntax table is found,
256 ;; popping the stack, it pushes the current syntax
282 ;; syntax table list.
301 labels ;; List of keywords labeling syntax tables.
305 label ;; A keyword naming this syntax table.
307 indent ;; Indentation function for the syntax table.
323 ;; a cleaner code when defining the syntax highlight rules.
352 ;; can put conditionals in the syntax definition,
360 (error "SYNTABLE: invalid syntax table argument ~A" item)
364 ;; Build the syntax table.
383 (error "SYNAUGMENT: bad syntax table label ~A" keyword)
405 ;; For every child syntax table.
422 ;; syntax table.
424 (defun compile-syntax-augment-list (table table-list
442 ;; Check if the specified syntax tables exists!
460 ;; to the syntax table in the second pass.
465 (compile-syntax-augment-list child table-list)
472 ;; every child syntax table.
474 (defun link-syntax-augment-table (table)
508 (link-syntax-augment-table child)
514 ;; "Compile" the main structure of the syntax highlight code.
517 (defun compile-syntax-table (name options main-table &aux syntax elements
548 ;; Check for typos in the keywords, or for not defined syntax tables.
571 ;; Create a list of all properties used by the syntax.
611 ;; Now that a list of all nested syntax tables is known, compile the
619 (compile-syntax-augment-list main-table tables)
622 (link-syntax-augment-table main-table)
671 (setq syntax
672 (make-syntax
677 (compile-syntax-property-list
691 ;; Loop applying the specifed syntax table to the text.
701 (defun syntax-highlight (*syntax*
715 (property-list (syntax-quark *syntax*))
722 (and (>= *from* *to*) (return-from syntax-highlight (values *from* nil)))
734 ;; Used to check if end of file found but syntax stack did
738 ;; Used in interactive mode, to return the syntax table
746 (syntax-table (car (syntax-labels *syntax*)))
749 (default-property (syntable-property syntax-table))
755 ;; The tokens in the current syntax table that may match,
800 ;; Beginig a new syntax table?
803 ;; Switching to another syntax table?
806 ;; Property flag when changing the current syntax table.
809 ;; Flag to know if syntax table has changed.
829 ;; If a nested syntax table wasn't finished
849 token-list (syntable-tokens syntax-table)
862 (not (syntable-eol syntax-table))
863 (not (syntable-bol syntax-table)))
877 (syntable-label syntax-table)
900 ;; matches list, as a match from another syntax
1077 ;; Result already known, and there is no syntax table
1082 (setq indent-table syntax-table))
1195 ;; If the syntax table is not changed,
1242 (setq indent-table syntax-table))
1246 ;; When changing the current syntax table.
1258 syntax-table (pop stack)
1265 ;; returning to a named syntax table,
1272 syntax-table (pop stack)
1275 (not (eq switch syntax-table))
1283 (unless syntax-table
1285 ;; Return to the topmost syntax table.
1287 syntax-table
1288 (car (syntax-labels *syntax*))
1293 (syntable-label syntax-table)
1298 (setq token-list (syntable-tokens syntax-table))
1306 stack (cons syntax-table stack)
1309 syntax-table begin
1312 (syntable-label syntax-table)
1317 ;; Change current syntax table.
1319 default-property (syntable-property syntax-table)
1320 current-token-list (syntable-tokens syntax-table)
1389 ;; there are nested syntax tables, and there is a
1452 (compile 'syntax-highlight)