~ubuntu-branches/ubuntu/quantal/gclcvs/quantal

« back to all changes in this revision

Viewing changes to h/lex.h

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2004-06-24 15:13:46 UTC
  • Revision ID: james.westby@ubuntu.com-20040624151346-xh0xaaktyyp7aorc
Tags: 2.7.0-26
C_GC_OFFSET is 2 on m68k-linux

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
(c) Copyright Taiichi Yuasa and Masami Hagiya, 1984.  All rights reserved.
 
3
Copying of this file is authorized to users who have executed the true and
 
4
proper "License Agreement for Kyoto Common LISP" with SIGLISP.
 
5
*/
 
6
 
 
7
/*
 
8
 
 
9
        lex.h
 
10
 
 
11
        lexical environment
 
12
*/
 
13
 
 
14
 
 
15
EXTER object *lex_env;
 
16
 
 
17
 
 
18
 
 
19
/*
 
20
                        VS
 
21
                |               |
 
22
                |---------------|
 
23
lex_env ------> |    lex-var    |       : lex_env[0]
 
24
                |---------------|
 
25
                |    lex-fd     |       : lex_env[1]
 
26
                |---------------|
 
27
                |    lex-tag    |       : lex_env[2]
 
28
                |---------------|
 
29
                |               |
 
30
                |               |
 
31
                |               |
 
32
 
 
33
        lex-var:        (symbol value)          ; for local binding
 
34
                  (....    or          ....)
 
35
                        (symbol)                ; for special binding
 
36
 
 
37
        lex-fd:         (fun-name 'FUNCTION'   function)
 
38
                  (....         or                              ...)
 
39
                        (macro-name 'MACRO' expansion-function)
 
40
 
 
41
        lex-tag:        (tag    'TAG'   frame-id)
 
42
                  (....         or                    ....)
 
43
                        (block-name 'BLOCK' frame-id)
 
44
 
 
45
where 'FUN' is the LISP object with pname FUN, etc.
 
46
 
 
47
 
 
48
*/
 
49
 
 
50
#define lex_copy()      ihs_top->ihs_base = vs_top;  \
 
51
                        vs_push(lex_env[0]);  \
 
52
                        vs_push(lex_env[1]);  \
 
53
                        vs_push(lex_env[2]);  \
 
54
                        lex_env = vs_top - 3
 
55
 
 
56
#define lex_new()       ihs_top->ihs_base = vs_top;  \
 
57
                        lex_env = vs_top;  \
 
58
                        vs_top[0] = vs_top[1] = vs_top[2] = Cnil;  \
 
59
                        vs_top += 3
 
60
 
 
61
#define lex_var_sch(name)       assoc_eq((name),lex_env[0])
 
62
 
 
63
#define lex_fd_sch(name)        assoc_eq((name),lex_env[1])
 
64