Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -370,10 +370,11 @@ jobs:
if [ "$tree" != "0" ] || [ "$(grep -c '^ _line ' "$FIX/input/text.txt_log/final.tree")" != "3" ]; then
echo "FAIL(zone-mode): final.tree is not three _line stubs:"; cat "$FIX/input/text.txt_log/final.tree"; exit 1
fi
# -DEV writes per-zone pass trees, named by zone.
# -DEV writes per-zone pass trees, named by zone. The zone line takes
# no pass number, as in the sequence view, so words is pass 3.
for z in 001 002 003; do
if [ ! -f "$FIX/input/text.txt_log/z$z-ana004.tree" ]; then
echo "FAIL(zone-mode): no z$z-ana004.tree"; ls "$FIX/input/text.txt_log"; exit 1
if [ ! -f "$FIX/input/text.txt_log/z$z-ana003.tree" ]; then
echo "FAIL(zone-mode): no z$z-ana003.tree"; ls "$FIX/input/text.txt_log"; exit 1
fi
done
echo "[zone-mode] one run of the zone passes per zone, zones kept as stubs"
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,11 @@ jobs:
if [ "$tree" != "0" ] || [ "$(grep -c '^ _line ' "$FIX/input/text.txt_log/final.tree")" != "3" ]; then
echo "FAIL(zone-mode): final.tree is not three _line stubs:"; cat "$FIX/input/text.txt_log/final.tree"; exit 1
fi
# -DEV writes per-zone pass trees, named by zone.
# -DEV writes per-zone pass trees, named by zone. The zone line takes
# no pass number, as in the sequence view, so words is pass 3.
for z in 001 002 003; do
if [ ! -f "$FIX/input/text.txt_log/z$z-ana004.tree" ]; then
echo "FAIL(zone-mode): no z$z-ana004.tree"; ls "$FIX/input/text.txt_log"; exit 1
if [ ! -f "$FIX/input/text.txt_log/z$z-ana003.tree" ]; then
echo "FAIL(zone-mode): no z$z-ana003.tree"; ls "$FIX/input/text.txt_log"; exit 1
fi
done
echo "[zone-mode] one run of the zone passes per zone, zones kept as stubs"
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,11 @@ jobs:
if [ "$tree" != "0" ] || [ "$(grep -c '^ _line ' "$FIX/input/text.txt_log/final.tree")" != "3" ]; then
echo "FAIL(zone-mode): final.tree is not three _line stubs:"; cat "$FIX/input/text.txt_log/final.tree"; exit 1
fi
# -DEV writes per-zone pass trees, named by zone.
# -DEV writes per-zone pass trees, named by zone. The zone line takes
# no pass number, as in the sequence view, so words is pass 3.
for z in 001 002 003; do
if [ ! -f "$FIX/input/text.txt_log/z$z-ana004.tree" ]; then
echo "FAIL(zone-mode): no z$z-ana004.tree"; ls "$FIX/input/text.txt_log"; exit 1
if [ ! -f "$FIX/input/text.txt_log/z$z-ana003.tree" ]; then
echo "FAIL(zone-mode): no z$z-ana003.tree"; ls "$FIX/input/text.txt_log"; exit 1
fi
done
echo "[zone-mode] one run of the zone passes per zone, zones kept as stubs"
Expand Down
17 changes: 10 additions & 7 deletions lite/parse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,13 @@ static const int RUN_ABORT = 2; // A pass failed: stop without finishing up.

int Parse::runPass(Delt<Seqn> *seq, long &num)
{
// zone and endzone lines are markers, not passes: like a folder line, they
// take no pass number, so pass numbers (and ana###.tree names) match the
// sequence view's.
const _TCHAR *salgo = str(seq->getData()->getAlgoname());
if (!strcmp_i(salgo, _T("zone")) || !strcmp_i(salgo, _T("endzone")))
return RUN_OK;

// A run past its time limit runs no more passes. The pass that ran
// out stopped at its next while turn; the rest are skipped whole. // 10/25/26 DD.
if (overBudget(true))
Expand Down Expand Up @@ -644,7 +651,7 @@ std::vector<Node<Pn> *> zones;
if (root)
findZones(root->pDown, ztype, zones);

long base = currpass_; // The zone line's own pass number.
long base = currpass_; // The last pass before the zone line.
long num = base;
int result = RUN_OK;
Delt<Seqn> *seq;
Expand Down Expand Up @@ -703,11 +710,9 @@ for (long z = 0; z < nzones && result == RUN_OK; ++z)
zoneNum_ = 0;
zoneFirst_ = zoneLast_ = false;

// The wrap-up passes, once, on the whole document. The endzone line takes
// a pass number of its own, as the zone line does.
// The wrap-up passes, once, on the whole document.
if (endz && result == RUN_OK)
{
++num;
for (seq = endz->Right(); seq && result == RUN_OK; seq = seq->Right())
result = runPass(seq, num);
}
Expand Down Expand Up @@ -764,9 +769,7 @@ for (seq = ana->getSeq(); seq; seq = seq->Right())
Seqn *pass = seq->getData();
if (pass->getActive() && !strcmp_i(str(pass->getAlgoname()), _T("zone")))
{
// The zone line takes a pass number, as a folder line does, so the
// passes after it keep the numbers the sequence file gives them.
++currpass_;
// The zone line takes no pass number (see runPass).
if (executeZones(seq->Right(), pass->getRulesfilename()) == RUN_ABORT)
return;
break;
Expand Down
2 changes: 1 addition & 1 deletion nlp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ All rights reserved.
#include "lite/nlp_engine.h"
#include "version.h"

#define NLP_ENGINE_VERSION "4.2.47"
#define NLP_ENGINE_VERSION "4.2.48"

bool cmdReadArgs(int, _TCHAR *argv[], _TCHAR *&, _TCHAR *&, _TCHAR *&, _TCHAR *&, bool &, bool &, bool &, bool &, bool &, bool &, int &, bool &, bool &, _TCHAR *&, double &);
void cmdHelpargs(_TCHAR *);
Expand Down
Loading