* Copyright (c) 1983 Regents of the University of California.
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by the University of California, Berkeley. The name of the
* University may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
static char sccsid
[] = "@(#)parser1.c 3.20 (Berkeley) %G%";
if (token
== T_EOF
|| p_abort())
while (token
!= T_EOL
&& token
!= T_EOF
) {
for (; p_statement(flag
) >= 0; p_clearerr())
return p_expression(flag
);
if (p_expr(&t
, flag
) < 0) {
true = !true && t
.v_num
!= 0;
p_error("if: Numeric value required.");
p_statementlist(flag
&& true);
p_statementlist(flag
&& !true);
int p_function(), p_assign();
if (p_expr(&t
, flag
) < 0)
if (token
!= T_ASSIGN
&& p_convstr(&t
) < 0)
cmd
= t
.v_type
== V_STR
? t
.v_str
: 0;
if ((*(token
== T_ASSIGN
? p_assign
: p_function
))(cmd
, &t
, flag
) < 0) {
else if (token
!= T_EOF
) {
register struct value
*v
;
if ((v
->v_str
= str_itoa(v
->v_num
)) == 0) {
cx
.x_synerred
= cx
.x_erred
= 1;
cx
.x_erred
= cx
.x_abort
= 1;