RT-Thread finsh源码分析: finsh_token.h
来源:互联网 发布:网络间接市场调研方法 编辑:程序博客网 时间:2024/06/06 01:52
/* * token lex for finsh shell. * * COPYRIGHT (C) 2006 - 2013, RT-Thread Development Team * * This file is part of RT-Thread (http://www.rt-thread.org) * Maintainer: bernard.xiong <bernard.xiong at gmail.com> * * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Change Logs: * Date Author Notes * 2010-03-22 Bernard first version */#ifndef __FINSH_TOKEN_H__#define __FINSH_TOKEN_H__#include <finsh.h>//token类型定义enum finsh_token_type{ finsh_token_type_left_paren = 1, /* ( */ finsh_token_type_right_paren , /* ) */ finsh_token_type_comma , /* , */ finsh_token_type_semicolon , /* ; */ finsh_token_type_mul , /* * */ finsh_token_type_add , /* + */ finsh_token_type_inc , /* ++ */ finsh_token_type_sub , /* - */ finsh_token_type_dec , /* -- */ finsh_token_type_div , /* / */ finsh_token_type_mod , /* % */ finsh_token_type_assign , /* = */ finsh_token_type_and, /* & */ finsh_token_type_or, /* | */ finsh_token_type_xor, /* ^ */ finsh_token_type_bitwise, /* ~ */ finsh_token_type_shl, /* << */ finsh_token_type_shr, /* >> */ finsh_token_type_comments, /* // */ /*-- data type --*/ finsh_token_type_void, /* void */ finsh_token_type_char, /* char */ finsh_token_type_short, /* short */ finsh_token_type_int, /* int */ finsh_token_type_long, /* long */ finsh_token_type_unsigned, /* unsigned */ /* data value type */ finsh_token_type_value_char, /* v:char */ finsh_token_type_value_int, /* v:int */ finsh_token_type_value_long, /* v:long */ finsh_token_type_value_string, /* v:string */ finsh_token_type_value_null, /* NULL */ /*-- others --*/ finsh_token_type_identifier, /* ID */ finsh_token_type_bad, /* bad token */ finsh_token_type_eof};//获取当前操作位移#define finsh_token_position(self) (self)->position#define finsh_token_replay(self) (self)->replay = 1void finsh_token_init(struct finsh_token* self, u_char* script);enum finsh_token_type finsh_token_token(struct finsh_token* self);void finsh_token_get_token(struct finsh_token* self, u_char* token);#endif
0 0
- RT-Thread finsh源码分析: finsh_token.h
- RT-Thread finsh源码分析: finsh_token.c
- RT-Thread finsh源码分析: finsh_error.h
- RT-Thread finsh源码分析: finsh_var.h
- RT-Thread finsh源码分析: finsh_heap.h
- RT-Thread finsh源码分析: finsh_node.h
- RT-Thread finsh源码分析: finsh_ops.h
- RT-Thread finsh源码分析: finsh_error.c
- RT-Thread finsh源码分析: finsh_var.c
- RT-Thread finsh源码分析: finsh_node.c
- RT-Thread finsh源码分析: finsh_ops.c
- RT-thread finsh组件工作流程
- rt-thread线程源码分析
- rt-thread线程源码分析
- rt-thread的定时器管理源码分析
- rt-thread线程调度器源码分析
- rt-thread的空闲线程源码分析
- RT-Thread 源码分析 总目录
- apache目录结构以及虚拟目录、虚拟主机配置
- hdu5400--Arithmetic Sequence
- Android 中Canvas的使用
- Linux SSH免密码登陆
- android的消息队列机制
- RT-Thread finsh源码分析: finsh_token.h
- Qt_VS问题
- iOS8 UISearchViewController搜索功能讲解
- Java笔试面试题010
- Android BroadCast 广播的两种注册方式和粘性广播实现
- hdu5372 离散化+树状数组
- HDU 3642 Get The Treasury (线段树扫描线进阶--求长方体重叠3次或以上的体积)
- [搜索]hdu5336
- linux之wait函数