Language: C

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
#include<algorithm>
#include<string>
#include<sstream>
#include<set>
#include<map>
#include<vector>
#include<queue>
#include<iostream>
#include<time.h>
#define forn(i,n) for(int i=0;i<n;i++)
#define clr(a,b) memset(a,b,sizeof(a))
//#define ll long long
#define ll long long
#define lowb(i) (i&(-i))
#define bug(n,m,x) forn(i,n){forn(j,m)printf("%d ",x[i][j]);puts("");}puts("")
#define sqr(x) ((x)*(x))
using namespace std;
const int inf=1<<30;
const double eps=1e-8;
const double pi=acos(-1.0);
//const double inf = 1e10;

int index,idx,len;
char buf[10000000];
map <string,string> mapa;
bool readword()
{
    while(buf[idx]==' '||buf[idx]=='\n'||buf[idx]=='\t'||buf[idx]=='\r')idx++;
    if(idx>=len)return false;
    if(buf[idx]>='A'&&buf[idx]<='Z'||buf[idx]>='a'&&buf[idx]<='z'){
        char a[100]={0};
        int l=0;
        do{
            a[l++]=buf[idx];
            if(idx<len)idx++;
        }while(buf[idx]>='A'&&buf[idx]<='Z'||buf[idx]>='a'&&buf[idx]<='z'||buf[idx]>='0'&&buf[idx]<='9'||buf[idx]=='_');
        char b[100];
        if(mapa.find(a)==mapa.end())strcpy(b,"ident");
        else strcpy(b,mapa[a].c_str());
        printf("%-4d%-10s%-10s\n",index++,a,b);
    }
    else if(buf[idx]>='0'&&buf[idx]<='9'||buf[idx]=='.'&&idx!=len-1){
        char a[100]={0};
        int flag=(buf[idx]=='.');
        int l=0;
        do{
            a[l++]=buf[idx];
            if(idx<len)idx++;
            if(buf[idx]=='.'){
                if(idx==len-1){
                    printf("%-4d%-10s%-20s%-10s\n",index++,a,"number",a);
                    printf("%-4d%-10s%-10s\n",index++,".",mapa["."].c_str());
                    return false;
                }
                if(flag)return false;
                if(idx<len)idx++;
                if(buf[idx]>='0'&&buf[idx]<='9')a[l++]='.';
                else if(buf[idx]==' '||buf[idx]=='\n'||buf[idx]=='\t'||buf[idx]=='\r'){
                    printf("%-4d%-10s%-20s%-10s\n",index++,a,"number",a);
                    return true;
                }
                else return false;
            }
        }while(buf[idx]>='0'&&buf[idx]<='9');
        if(buf[idx]==' '||buf[idx]=='\n'||buf[idx]=='\t'||buf[idx]=='\r'||
           buf[idx]=='+'||buf[idx]=='-'||buf[idx]=='*'||buf[idx]=='/'||
           buf[idx]==','||buf[idx]==';'||buf[idx]=='#'||buf[idx]=='='){
            printf("%-4d%-10s%-20s%-10s\n",index++,a,"number",a);
        }else return false;
    }
    else if(buf[idx]==','||buf[idx]==';'||buf[idx]=='+'||buf[idx]=='-'||buf[idx]=='*'||buf[idx]=='/'||
            buf[idx]=='('||buf[idx]==')'||buf[idx]=='#'){
        printf("%-4d%-10c%-10s\n",index++,buf[idx],mapa[string(&buf[idx],&buf[idx+1])].c_str());
        idx++;
    }
    else if(buf[idx]==':'&&buf[idx+1]=='='){
        printf("%-4d%c%-9c%-10s\n",index++,buf[idx],buf[idx+1],mapa[string(&buf[idx],&buf[idx+2])].c_str());
        idx+=2;
    }
    else if(buf[idx]=='>'||buf[idx]=='<'){
        if(buf[idx+1]=='='){
            printf("%-4d%c%-9c%-10s\n",index++,buf[idx],buf[idx+1],mapa[string(&buf[idx],&buf[idx+2])].c_str());
            idx+=2;
        }
        else{
            printf("%-4d%-10c%-10s\n",index++,buf[idx],mapa[string(&buf[idx],&buf[idx+1])].c_str());
            idx++;
        }
    }
    else if(buf[idx]=='='&&buf[idx+1]=='='){
        printf("%-4d%c%-9c%-10s\n",index++,buf[idx],buf[idx+1],mapa[string(&buf[idx],&buf[idx+2])].c_str());
        idx+=2;
    }
    else if(buf[idx]=='.'&&idx==len-1){
        printf("%-4d%-10c%-10s\n",index++,buf[idx],mapa[string(&buf[idx],&buf[idx+1])].c_str());
        idx++;
    }
    else return false;
    return true;
}
void init()
{
    mapa[","]="comma";
    mapa[";"]="Semicolon";
    mapa["+"]="plus";
    mapa["-"]="minus";
    mapa["*"]="times";
    mapa["/"]="slash";
    mapa["("]="lparen";
    mapa[")"]="rparen";
    mapa["=="]="eql";
    mapa[":="]="assign";
    mapa[">="]="greateroreql";
    mapa["<="]="lessoreql";
    mapa[">"]="greater";
    mapa["<"]="less";
    mapa["."]="period";
    mapa["#"]="neq";
    mapa["begin"]="begin";
    mapa["call"]="call";
    mapa["const"]="const";
    mapa["do"]="do";
    mapa["end"]="end";
    mapa["if"]="if";
    mapa["odd"]="odd";
    mapa["procedure"]="procedure";
    mapa["read"]="read";
    mapa["then"]="then";
    mapa["var"]="var";
    mapa["while"]="while";
    mapa["write"]="write";
    idx=0;
}
void morpheme_analysis()
{
    init();
    puts("\n=======================================");
    while(readword());
    puts("\n=======================================");
}
int main()
{
    freopen("D:\\in.txt","r",stdin);
    while((buf[len++]=getchar())!=EOF);
    puts(buf);
    for(int i=len-1;i>=0;i--)if(buf[i]==' '||buf[i]=='\n'||buf[i]=='\t'||buf[i]=='\r'||buf[i]==EOF);
    else {
        len=i+1;break;
    }
    morpheme_analysis();
    return 0;
}

Compiler output:
main.c:5:9: fatal error: algorithm: No such file or directory
    5 | #include<algorithm>
      |         ^~~~~~~~~~~
compilation terminated.