【文件属性】:
文件名称:shell_parser_jaeskim:shell cmd解析器(Tokenizer,Lexer,Parser)
文件大小:13KB
文件格式:ZIP
更新时间:2021-04-11 22:23:53
C
这是为了研究Shell的cmd Tokenizer,Lexer和Parser而创建的一个回购协议。
分词器
什么是分词器
令牌化是将单个字符串分成多个单词(通过空格和特殊符号之类的条件)!
换句话说,如果您将字符串标记化,您将获得标记!
例子
例子1
前
echo " \" hello wolrd! \" " ; touch helloworld
后
[ " echo " , " \" hello wolrd! \" " , " ; " , " touch " , " helloworld " ]
例子2
前
echo -n " This is an example " | cat -e > file1 | cat < file1> file2
后
[
" echo " ,
" -n " ,
" This is an example " ,
" | " ,
【文件预览】:
shell_parser_jaeskim-master
----.gitignore(2KB)
----Makefile(3KB)
----src()
--------parser.c(963B)
--------tokenizer.c(1007B)
--------main.c(1KB)
----.gitmodules(105B)
----include()
--------parser.h(1KB)
----image()
--------tokenizer-flow.drawio.svg(70KB)
----lib()
--------libft()
----readme.md(900B)