Soar Kernel  9.3.2 08-06-12
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
parser.h
Go to the documentation of this file.
1 /*************************************************************************
2  * PLEASE SEE THE FILE "license.txt" (INCLUDED WITH THIS SOFTWARE PACKAGE)
3  * FOR LICENSE AND COPYRIGHT INFORMATION.
4  *************************************************************************/
5 
6 /* ======================================================================
7  parser.h
8 
9  The Production (SP) Parser
10 
11  Init_parser() should be called at startup time. Parse_production()
12  reads an SP (starting from the production name), builds a production,
13  adds it to the rete, and returns a pointer to the new production
14  (or NIL if any error occurred). Parse_lhs() reads just an LHS,
15  and returns a condition list (or NIL if an error occurred).
16  Parse_rhs() reads an RHS, setting "dest_rhs" to point to the resulting
17  action list; it returns TRUE if successful, FALSE if any error occurred.
18 ====================================================================== */
19 
20 #ifndef PARSER_H
21 #define PARSER_H
22 
23 #ifdef __cplusplus
24 //extern "C"
25 //{
26 #endif
27  typedef char Bool;
28  typedef char * test;
29  typedef struct condition_struct condition;
30  typedef struct action_struct action;
31  typedef struct agent_struct agent;
32  typedef union symbol_union Symbol;
33 
34  extern void init_parser (void);
35  extern condition *parse_lhs (agent* thisAgent);
36  extern Bool parse_rhs (agent* thisAgent, action **dest_rhs);
37  extern struct production_struct *parse_production (agent* thisAgent, unsigned char* rete_addition_result);
38  extern Symbol *make_symbol_for_current_lexeme (agent* thisAgent, bool allow_lti);
39  extern bool parse_lti(agent* thisAgent);
40 
41 #ifdef __cplusplus
42 //}
43 #endif
44 
45 #endif