combined some awk options into QSE_AWK_EXTRAKWS.

deleted QSE_AWK_EXTRAOPS and enabled all new operators by default
added === and !==.
fixed a bug in printing the explicit concatenation operator(%%, %%=)
improved @include handling
This commit is contained in:
2012-10-25 14:38:27 +00:00
parent b53fe11c04
commit 8ac0963885
16 changed files with 342 additions and 273 deletions

View File

@ -53,7 +53,6 @@ int main ()
/* don't allow BEGIN, END, pattern-action blocks */
opt &= ~QSE_AWK_PABLOCK;
/* enable ** */
opt |= QSE_AWK_EXTRAOPS;
qse_awk_setopt (awk, QSE_AWK_TRAIT, &opt);

View File

@ -139,7 +139,7 @@ static int awk_main (int argc, qse_char_t* argv[])
awk.setTrait (
awk.getTrait() |
QSE_AWK_MAPTOVAR |
QSE_AWK_RESET);
QSE_AWK_EXTRAKWS);
if (ret >= 0) ret = run_awk (awk);
if (ret <= -1)

View File

@ -356,8 +356,7 @@ static int awk_main_2 (MyAwk& awk, int argc, qse_char_t* argv[])
cmdline_t cmdline;
int n;
awk.setTrait (awk.getTrait() | QSE_AWK_INCLUDE |
QSE_AWK_MAPTOVAR | QSE_AWK_RWPIPE | QSE_AWK_EXTRAOPS);
awk.setTrait (awk.getTrait() | QSE_AWK_EXTRAKWS | QSE_AWK_MAPTOVAR | QSE_AWK_RWPIPE);
// ARGV[0]
if (awk.addArgument (QSE_T("awk08")) <= -1)

View File

@ -64,7 +64,7 @@ int main ()
}
qse_awk_getopt (awk, QSE_AWK_TRAIT, &opt);
opt |= QSE_AWK_NEXTOFILE;
opt |= QSE_AWK_EXTRAKWS;
qse_awk_setopt (awk, QSE_AWK_TRAIT, &opt);
psin.type = QSE_AWK_PARSESTD_STR;

View File

@ -59,8 +59,6 @@ int main ()
opt &= ~QSE_AWK_PABLOCK;
/* can assign a map to a variable */
opt |= QSE_AWK_MAPTOVAR;
/* enable ** */
opt |= QSE_AWK_EXTRAOPS;
qse_awk_setopt (awk, QSE_AWK_TRAIT, &opt);
psin.type = QSE_AWK_PARSESTD_STR;