Bringing ChocolateCaste-0.7 into the main branch.
[AROS-Contrib.git] / rexx / inc / nextsymb.h
blobd69c26293f4b6fb49a50072eacdd0b31cb7b15aa
1 /*
2 * $Header$
3 * $Log$
4 * Revision 1.1 2001/04/04 05:43:37 wang
5 * First commit: compiles on Linux, Amiga, Windows, Windows CE, generic gcc
7 * Revision 1.2 1999/11/29 14:58:00 bnv
8 * Changed: Some defines
10 * Revision 1.1 1998/07/02 17:35:50 bnv
11 * Initial revision
15 #ifndef __NEXTSYMBOL_H__
16 #define __NEXTSYMBOL_H__
18 #include <lstring.h>
20 #ifdef __NEXTSYMB_C__
21 # define EXTERN
22 #else
23 # define EXTERN extern
24 #endif
27 enum symboltype {
28 ident_sy /* identifier symbol */
29 ,function_sy /* ident with a paren */
30 ,literal_sy /* literal symbol */
31 ,le_parent /* ( */ /* the order */
32 ,le_bracket /* [ */ /* until */
33 ,le_curlbracket /* { */ /* not_ty */
34 ,plus_sy /* + */ /* is important */
35 ,inc_sy /* ++ */ /* for expr.c */
36 ,minus_sy /* - */
37 ,dec_sy /* -- */
38 ,not_sy /* ^ or \ */ /* ------------ */
40 ,eq_sy ,deq_sy /* = == */ /* eq_sy - first */
41 ,ne_sy ,dne_sy /* ^= ^== */
42 ,le_sy ,ge_sy /* <= => */
43 ,lt_sy ,gt_sy /* < > */
44 ,dle_sy ,dge_sy /* <<= =>> */
45 ,dlt_sy ,dgt_sy /* << >> */
47 ,times_sy /* * */ /* another group */
48 ,div_sy /* / */
49 ,mod_sy /* % */
50 ,intdiv_sy /* // */ /* --------------- */
52 ,ri_parent /* ) */
53 ,ri_bracket /* ] */
54 ,ri_curlbracket /* } */
55 ,dot_sy /* . */
56 ,tidle_sy /* ~ */
58 ,power_sy /* ** */
59 ,and_sy /* & */
60 ,or_sy /* | */
61 ,xor_sy /* && */
62 ,concat_sy /* || */
63 ,bconcat_sy /* |b| */
64 ,comma_sy /* , */
65 ,semicolon_sy /* ; */
66 ,to_sy /* in_do */
67 ,by_sy /* in_do */
68 ,for_sy /* in_do */
69 ,until_sy /* in_do */
70 ,while_sy /* in_do */
71 ,then_sy /* in_if_...*/
72 ,with_sy /* in_parse */
73 ,label_sy
74 ,exit_sy
76 /*---------------------------------------------------
77 ,div_assign_sy * /= *
78 ,times_assign_sy * *= *
79 ,mod_assign_sy * %= *
80 ,power_assign_sy * **= *
81 ,intdiv_assign_sy * //= *
82 ,and_assign_sy * &= *
83 ,plus_assign_sy * += *
84 ,minus_assign_sy * -= *
85 ,concat_assign_sy * ||= *
86 ,or_assign_sy * |= *
87 ,xor_assign_sy * &&= *
88 ----------------------------------------------------*/
91 enum stat_type {
92 normal_st /* normal statement */
93 ,in_do_st
94 ,in_do_init_st
95 ,in_if_init_st
96 ,in_if_st
97 ,in_parse_value_st
100 EXTERN enum symboltype symbol; /* contains the symbol */
101 EXTERN Lstr symbolstr; /* symbol identifier */
102 EXTERN bool symbolisstr; /* if litteral was inside quotes*/
103 EXTERN bool symbolPrevBlank; /* previous blank */
104 EXTERN int symbolhasdot; /* is symbol has a dot->stem */
105 EXTERN char *symbolptr; /* current symbol pointer */
106 EXTERN char *symbolprevptr; /* start of current symbol */
107 EXTERN int symboline; /* current line number */
108 EXTERN enum stat_type symbolstat; /* statement type */
110 /* -------- function prototypes ----------- */
111 void InitNextsymbol( PLstr str );
112 void nextsymbol(void);
114 #undef EXTERN
115 #endif