File: parser.h

package info (click to toggle)
evms 2.5.2-1.sarge2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 14,248 kB
  • ctags: 15,488
  • sloc: ansic: 201,340; perl: 12,421; sh: 4,262; makefile: 1,516; yacc: 316; sed: 16
file content (79 lines) | stat: -rw-r--r-- 3,411 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
 *
 *   (C) Copyright IBM Corp. 2001, 2003
 *
 *   This program is free software;  you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY;  without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
 *   the GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program;  if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 * Module: parser.h
 */
 
/*
 * Change History:
 *
 * 6/2001  B. Rafanello  Initial version.
 *
 */


#ifndef PARSER_H

#define PARSER_H 1

#include "dlist.h"
#include "interpreter.h"


/*********************************************************************/
/*                                                                   */
/*   Function Name: Parse_Command_Line                               */
/*                                                                   */
/*   Descriptive Name: Parses a stream of tokens provided by the     */
/*                     scanner and screener and produces a list of   */
/*                     trees representing the commands found in the  */
/*                     stream of tokens.  The trees are constructed  */
/*                     of nodes of type Executable_Node and are      */
/*                     suitable for use with the Interpret_Commands  */
/*                     function provided by interpreter.c.           */
/*                                                                   */
/*   Input: None.                                                    */
/*                                                                   */
/*   Output: The function return value is a list of trees where each */
/*           tree represents one command found in the input stream.  */
/*                                                                   */
/*   Error Handling: Parsing errors are reported immediately to the  */
/*                   user using the facilities provided in error.h.  */
/*                   If an error is encountered, then the function   */
/*                   will return a NULL value for the list.          */
/*                                                                   */
/*   Side Effects: Tokens are read from the input stream.  Tokens are*/
/*                 disposed of after use.  Error messages may be     */
/*                 output to the user.                               */
/*                                                                   */
/*   Notes: The SetInput function of the scanner must be used prior  */
/*          to calling this function to establish the source of      */
/*          input for scanning, screening, and parsing.              */
/*                                                                   */
/*********************************************************************/                                             
#ifdef Old_Style

dlist_t Parse_Command_Line(char * Command_Line_To_Parse);

#else

dlist_t Parse_Command_Line(void);

#endif
             
#endif