The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/scripts/tkparse.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  * tkparse.h
    3  */
    4 
    5 /*
    6  * Token types (mostly statement types).
    7  */
    8 
    9 enum e_token
   10 {
   11     token_UNKNOWN,
   12     token_bool, 
   13     token_choice_header,
   14     token_choice_item,
   15     token_comment, 
   16     token_define_bool,
   17     token_define_hex,
   18     token_define_int,
   19     token_define_string,
   20     token_define_tristate,
   21     token_dep_bool,
   22     token_dep_mbool,
   23     token_dep_tristate,
   24     token_else, 
   25     token_endmenu,
   26     token_fi, 
   27     token_hex,
   28     token_if, 
   29     token_int,
   30     token_mainmenu_name, 
   31     token_mainmenu_option, 
   32     token_source,
   33     token_string,
   34     token_then,
   35     token_tristate, 
   36     token_unset,
   37 };
   38 
   39 /*
   40  * Operator types for conditionals.
   41  */
   42 
   43 enum operator
   44 {
   45     op_eq,
   46     op_neq,
   47     op_and,
   48     op_and1,
   49     op_or,
   50     op_bang,
   51     op_lparen,
   52     op_rparen,
   53     op_constant,
   54     op_variable,
   55     op_true,
   56     op_false,
   57     op_nuked
   58 };
   59 
   60 /*
   61  * Conditions come in linked lists.
   62  * Some operators take strings:
   63  *
   64  *   op_constant   "foo"
   65  *   op_variable   "$ARCH", "$CONFIG_PMAC", "$CONFIG_EXPERIMENTAL"
   66  *
   67  * Most "$..." constructs refer to a variable which is defined somewhere
   68  * in the script.  Note that it is legal to test variables which are never
   69  * defined, such as variables that are meaningful only on other architectures.
   70  */
   71 
   72 struct condition
   73 {
   74     struct condition *  next;
   75     enum operator       op;
   76     const char *        str;            /* op_constant */
   77     int                 nameindex;      /* op_variable */
   78 };
   79 
   80 /*
   81  * Dependency list for dep_bool, dep_mbool, dep_tristate
   82  */
   83 
   84 struct dependency
   85 {
   86     char *              name;
   87     struct dependency * next;
   88 };
   89 
   90 /*
   91  * A statement from a config.in file
   92  */
   93 
   94 struct kconfig
   95 {
   96     struct kconfig *    next;
   97     enum e_token        token;
   98     int                 nameindex;
   99     char *              label;
  100     char *              value;
  101     struct condition *  cond;
  102     struct dependency * depend;         /* token_dep_tristate */
  103     struct kconfig *    cfg_parent;     /* token_choice_item */
  104 
  105     /* used only in tkgen.c */
  106     int                 menu_number;
  107     int                 menu_line;
  108     struct kconfig *    menu_next;
  109 };
  110 
  111 struct variable
  112 {
  113     char *      name;
  114     char        defined;
  115     char        global_written;
  116 };
  117 
  118 extern struct variable *vartable;
  119 extern int max_varnum;
  120 
  121 /*
  122  * Prototypes
  123  */
  124 
  125 extern void fix_conditionals ( struct kconfig * scfg );         /* tkcond.c */
  126 extern void dump_tk_script   ( struct kconfig * scfg );         /* tkgen.c  */
  127 extern int get_varnum        ( char * name );                   /* tkparse.c */

Cache object: 3888dafb53abe6f1739cbfeaa16ee069


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.