Add LexDemo.

This commit is contained in:
TomAwezome 2021-12-30 17:37:35 -05:00
parent 60f759145a
commit dccdb20ae0
5 changed files with 42 additions and 1 deletions

View file

@ -61,6 +61,7 @@ else
then
echo "Copying HTML docs to docs/..."
cp -r $TMPMOUNT/HTML/* ../docs
rm -rf ../src/HTML/
else
echo "No HTML docs to copy."
fi

37
src/Demo/Lectures/LexDemo.ZC Executable file
View file

@ -0,0 +1,37 @@
// See $LK+PU,"Tokens",A="MN:TK_EOF"$.
U0 Main()
{
U8 *src;
CCompCtrl *cc;
I64 tk;
"\nThis will Lex an expression,\n"
"reporting token-by-token.\n\n";
while (TRUE)
{
"\n";
src = StrGet;
if (*src)
{
cc = CompCtrlNew(src);
while (tk = Lex(cc))
{
"TOKEN: 0x%04X %d\n", tk, tk;
}
CompCtrlDel(cc);
}
else
{
Free(src);
break;
}
}
}
Main;

View file

@ -1,4 +1,6 @@
$WW,1$$FG,5$$TX+CX,"ChangeLog"$$FG$
$IV,1$----12/30/21 17:12:01----$IV,0$
* Added $LK+PU,"LexDemo",A="FI:::/Demo/Lectures/LexDemo.ZC"$.
$IV,1$----12/11/21 05:57:44----$IV,0$
* Raised version number to 1.07.

View file

@ -36,6 +36,7 @@ I64 Ping(U8 *hostname, I64 timeout=JIFFY_FREQ)
return -1;
}
"\n";
while (!CharScan)
{
payload = MAlloc(64);

View file

@ -15,7 +15,7 @@ U0 LoadDocDefines()
//$LK,"DD_BOOT_HIGH_LOC_DVD",A="FF:::/System/Boot/BootDVD.ZC,DD_BOOT_HIGH_LOC_DVD"$
$TR,"LineRep"$
$ID,2$DefinePrint("DD_ZEALOS_LOC","95,269");
$ID,2$DefinePrint("DD_ZEALOS_LOC","95,270");
$ID,-2$
DefinePrint("DD_MP_VECT", "%08X", MP_VECT_ADDR);
DefinePrint("DD_MP_VECT_END", "%08X", MP_VECT_ADDR + COREAP_16BIT_INIT_END - COREAP_16BIT_INIT - 1);