[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
3.7.11 A Pure (Reentrant) Parser
From: |
slipbits |
Subject: |
3.7.11 A Pure (Reentrant) Parser |
Date: |
Wed, 8 Jun 2022 10:50:44 -0700 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 |
The first sentence reads "A /reentrant/ program is one which does not
alter in the course of execution; in other words, it consists entirely
of /pure/ (read-only) code. "
Some points which confuse me:
1. "alters" what? The object is not mentioned. Did you mean that it
does not alter non-local data and input parameters? See paragraph 2
"The standard Yacc interfaces are inherently nonreentrant, because
they use statically allocated variables" which alludes to modifying
non-local data.
2. "...it consists entirely of /pure/ (read-only) code. " This is
confusing to me. In modern machines, code is read-only (this wasn't
the case in computers from the 50's, 60's, and I believe 70's in
which it was possible to alter the executing code. Did you mean that
the code did not alter non-local data and parameters? If it doesn't
alter anything then the function does nothing.
3. I'm not sure but I believe the standard definition of reentrancy is
that the external environment is unaltered. This is tantamount to
not altering data, objects, external objects, etc., that is, status
quo ante. After the execution of the code changes to the environment
external to the code is non-detectable. However, returning values
(of functions) and returning data through alteration of the input
parameters (either [inout] or [out]) is perfectly fine.
This section may be in error.
thanks
art
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 3.7.11 A Pure (Reentrant) Parser,
slipbits <=