mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-26 15:26:43 +00:00
Add LexDemo.
This commit is contained in:
parent
60f759145a
commit
dccdb20ae0
5 changed files with 42 additions and 1 deletions
|
@ -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
37
src/Demo/Lectures/LexDemo.ZC
Executable 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;
|
||||
|
|
@ -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.
|
||||
|
|
|
@ -36,6 +36,7 @@ I64 Ping(U8 *hostname, I64 timeout=JIFFY_FREQ)
|
|||
return -1;
|
||||
}
|
||||
|
||||
"\n";
|
||||
while (!CharScan)
|
||||
{
|
||||
payload = MAlloc(64);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue