Download Demo/Templates/Lex1.txt from hschumann2/TempleOS-Source-Code: direct link, hf CLI and curl.
- Browser
- Download file 516 Bytes
-
https://huggingface.co/datasets/hschumann2/TempleOS-Source-Code/resolve/main/Demo/Templates/Lex1.txt
- Command line
-
hf download hf://datasets/hschumann2/TempleOS-Source-Code/Demo/Templates/Lex1.txt
-
curl -L -o Lex1.txt https://huggingface.co/datasets/hschumann2/TempleOS-Source-Code/resolve/main/Demo/Templates/Lex1.txt
516 Bytes
| U0 MyRead(U8 *filename) | |
| { | |
| CCmpCtrl *cc=CmpCtrlNew(MStrPrint("#include \"%s\"",filename)); | |
| while (Lex(cc)) { | |
| "%03d:",cc->token; | |
| switch (cc->token) { | |
| case TK_IDENT: "IDENT:%s",cc->cur_str; break; | |
| case TK_STR: "STR:%s",cc->cur_str; break; | |
| case TK_CHAR_CONST: "CHAR:%d",cc->cur_i64; break; | |
| case TK_I64: "I64:%d",cc->cur_i64; break; | |
| case TK_F64: "F64:%d",cc->cur_f64; break; | |
| } | |
| '\n'; | |
| } | |
| CmpCtrlDel(cc); | |
| } | |