354 |
;;; This parser is limited to the operators &&, ||, !, and "defined". |
;;; This parser is limited to the operators &&, ||, !, and "defined". |
355 |
;;; Added ==, !=, +, and -. Gary Oberbrunner, garyo@avs.com, 8/9/94 |
;;; Added ==, !=, +, and -. Gary Oberbrunner, garyo@avs.com, 8/9/94 |
356 |
|
|
357 |
|
(defsubst hif-nexttoken () |
358 |
|
"Pop the next token from token-list into the let variable \"hif-token\"." |
359 |
|
(setq hif-token (pop hif-token-list))) |
360 |
|
|
361 |
(defun hif-parse-if-exp (hif-token-list) |
(defun hif-parse-if-exp (hif-token-list) |
362 |
"Parse the TOKEN-LIST. Return translated list in prefix form." |
"Parse the TOKEN-LIST. Return translated list in prefix form." |
363 |
(hif-nexttoken) |
(hif-nexttoken) |
366 |
(if hif-token ; is there still a token? |
(if hif-token ; is there still a token? |
367 |
(error "Error: unexpected token: %s" hif-token)))) |
(error "Error: unexpected token: %s" hif-token)))) |
368 |
|
|
|
(defsubst hif-nexttoken () |
|
|
"Pop the next token from token-list into the let variable \"hif-token\"." |
|
|
(setq hif-token (pop hif-token-list))) |
|
|
|
|
369 |
(defun hif-expr () |
(defun hif-expr () |
370 |
"Parse an expression as found in #if. |
"Parse an expression as found in #if. |
371 |
expr : term | expr '||' term." |
expr : term | expr '||' term." |