实例介绍
C语言解释器的C#源代码。支持char, short, int, float, struct以及指针(不支持函数指针)。支持函数、递归、变参函数以及函数嵌套。支持if, for, while, do/while, switch。不支持goto。
【实例截图】
【核心代码】
7c254d13-7c99-4108-8588-6b6420854257
├── SharpC
│ ├── Grammar
│ │ ├── Block.cs
│ │ ├── ConstantInitialize.cs
│ │ ├── Context.cs
│ │ ├── ControlFlow
│ │ │ ├── Break.cs
│ │ │ ├── Continue.cs
│ │ │ ├── ControlFlow.cs
│ │ │ ├── DoWhileLoop.cs
│ │ │ ├── ForLoop.cs
│ │ │ ├── IfThen.cs
│ │ │ ├── Loop.cs
│ │ │ ├── Return.cs
│ │ │ ├── Switch.cs
│ │ │ └── WhileLoop.cs
│ │ ├── DataTypeInfo.cs
│ │ ├── Expression
│ │ │ ├── ExpressionNode.cs
│ │ │ ├── ExpressionToken.cs
│ │ │ ├── Node.cs
│ │ │ ├── Operand
│ │ │ │ ├── Operand.cs
│ │ │ │ ├── Value.cs
│ │ │ │ ├── ValueOfFunctionCalling.cs
│ │ │ │ ├── ValueOfPointer.cs
│ │ │ │ ├── ValueOfPointerIndiction.cs
│ │ │ │ └── ValueOfVariableReference.cs
│ │ │ ├── Operator
│ │ │ │ ├── Binary
│ │ │ │ │ ├── Arithmetic
│ │ │ │ │ │ ├── Add.cs
│ │ │ │ │ │ ├── Div.cs
│ │ │ │ │ │ ├── HighLevelArithmetic.cs
│ │ │ │ │ │ ├── LowLevelArithmetic.cs
│ │ │ │ │ │ ├── Mod.cs
│ │ │ │ │ │ ├── Mul.cs
│ │ │ │ │ │ └── Sub.cs
│ │ │ │ │ ├── Assignment
│ │ │ │ │ │ ├── AddAssign.cs
│ │ │ │ │ │ ├── AndAssign.cs
│ │ │ │ │ │ ├── Assign.cs
│ │ │ │ │ │ ├── DivAssign.cs
│ │ │ │ │ │ ├── LeftShiftAssign.cs
│ │ │ │ │ │ ├── ModAssign.cs
│ │ │ │ │ │ ├── MulAssign.cs
│ │ │ │ │ │ ├── OrAssign.cs
│ │ │ │ │ │ ├── RightShiftAssign.cs
│ │ │ │ │ │ ├── SubAssign.cs
│ │ │ │ │ │ └── XorAssign.cs
│ │ │ │ │ ├── BinaryOperator.cs
│ │ │ │ │ ├── Bitwise
│ │ │ │ │ │ ├── BitwiseAnd.cs
│ │ │ │ │ │ ├── Bitwise.cs
│ │ │ │ │ │ ├── BitwiseOr.cs
│ │ │ │ │ │ └── BitwiseXor.cs
│ │ │ │ │ ├── Logic
│ │ │ │ │ │ ├── And.cs
│ │ │ │ │ │ ├── Equal.cs
│ │ │ │ │ │ ├── Greater.cs
│ │ │ │ │ │ ├── GreaterEqual.cs
│ │ │ │ │ │ ├── Less.cs
│ │ │ │ │ │ ├── LessEqual.cs
│ │ │ │ │ │ ├── LogicOperator.cs
│ │ │ │ │ │ ├── NotEqual.cs
│ │ │ │ │ │ └── Or.cs
│ │ │ │ │ ├── MemberAccess.cs
│ │ │ │ │ └── Shift
│ │ │ │ │ ├── LeftShift.cs
│ │ │ │ │ ├── RightShift.cs
│ │ │ │ │ └── ShiftOperator.cs
│ │ │ │ ├── Operator.cs
│ │ │ │ ├── Parentheses.cs
│ │ │ │ └── Unary
│ │ │ │ ├── BitwiseNot.cs
│ │ │ │ ├── GetAddress.cs
│ │ │ │ ├── Minus.cs
│ │ │ │ ├── Not.cs
│ │ │ │ ├── Plus.cs
│ │ │ │ ├── PointerIndirection.cs
│ │ │ │ ├── PostfixDecrease.cs
│ │ │ │ ├── PostfixIncrease.cs
│ │ │ │ ├── PrefixDecrease.cs
│ │ │ │ ├── PrefixIncrease.cs
│ │ │ │ ├── Sizeof.cs
│ │ │ │ ├── TypeCast.cs
│ │ │ │ └── UnaryOperator.cs
│ │ │ └── Token.cs
│ │ ├── Function
│ │ │ ├── ExternalFunction.cs
│ │ │ ├── FunctionArgumentDefine.cs
│ │ │ ├── FunctionCallingArgument.cs
│ │ │ ├── FunctionDefine.cs
│ │ │ └── InternalFunction
│ │ │ ├── Confirm.cs
│ │ │ ├── Free.cs
│ │ │ ├── Input.cs
│ │ │ ├── InputForm.cs
│ │ │ ├── InputForm.Designer.cs
│ │ │ ├── InputForm.resx
│ │ │ ├── Malloc.cs
│ │ │ ├── Print.cs
│ │ │ ├── Prompt.cs
│ │ │ ├── Vararg.cs
│ │ │ └── Varlen.cs
│ │ ├── Parser
│ │ │ ├── Parser.cs
│ │ │ └── SourceCode.cs
│ │ ├── Script
│ │ │ ├── Syntax.Lex
│ │ │ └── Syntax.yacc
│ │ ├── Statement.cs
│ │ ├── StructDefine.cs
│ │ ├── Typedef.cs
│ │ └── Variable.cs
│ ├── Memory.cs
│ ├── ParseException.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── RuntimeException.cs
│ ├── SharpC.cs
│ └── SharpC.csproj
├── SharpC.sln
├── SharpC.Test
│ ├── App.config
│ ├── ExecSample.txt
│ ├── ParseSample.txt
│ ├── Program.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── SharpC.Test.csproj
└── Syntax.Lex.Test
├── ComplieAndRun.Bat
├── syntax.lex.cc
├── Syntax.Lex.Test.vcxproj
├── Syntax.Lex.Test.vcxproj.user
├── Syntax.report.yacc.txt
├── Syntax.Test.Code.txt
├── Syntax.yacc.cc
├── Syntax.yacc.dot
└── Syntax.yacc.hh
21 directories, 120 files
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论