부모글 보이기/감추기 AD BLOCK 해제 요청 이 글에는 광고가 많이 들어가 있지 않습니다. adblock을 해제하셔도 글을 읽는데 그다지 부담이 없으니 해제를 부탁드립니다. (연관된 글이 1개 있습니다.) BBI 인터프리터 C/C++ 코드를 C#으로 변환 아래 글에 이어, 인터프리터 어휘 분석 프로그램 - C# 예제 ; https://www.sysnet.pe.kr/2/0/10903 인터프리터 - 역폴란드 표기법을 이용한 식의 분석 - C# 예제 ; https://www.sysnet.pe.kr/2/0/10904 인터프리터 - 재귀적 하향 구문 분석 C# 예제 ; https://www.sysnet.pe.kr/2/0/10907 마지막으로, 만들면서 배우는 인터프리터: 컴파일러 이론으로 만드는 나만의 스크립트 언어 ; http://www.yes24.com/24/goods/7858784?scode=032 책의 BBI Interpreter C/C++ 소스 코드를 C#으로 변환한 것을 올립니다. 사용 방법은 다음과 같은 식입니다. static void Main(string[] args) { string text = File.ReadAllText("sample0.txt"); Interpreter bbi = new Interpreter(); bbi.Convert(text); bbi.SyntaxCheck(); bbi.Execute(); } 비주얼 스튜디오에서 디버그 모드로 한줄 한줄 실행해 보면 눈에 들어오실 것입니다. ^^ (첨부한 파일은 소스 코드입니다.) [이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.] [다음 글] .NET Framework: 563. 디버깅 용도로 이진 트리의 내용을 출력하는 방법[이전 글] .NET Framework: 561. null 처리된 객체가 왜 GC에 의해 수집되지 않을까요? [연관 글] 인터프리터 원리가 궁금합니다. [최초 등록일: 3/17/2016] [최종 수정일: 4/12/2024] 이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다. by SeongTae Jeong, mailto:techsharer at outlook.com 비밀번호 댓글 작성자 2016-03-18 08시47분 Sample 파일까지 친절히 넣어주셨네요 ^^좋은 자료 감사합니다!덕분에 인터프리터 약간이라도 이해를 했네요. 김선우 2016-03-18 02시37분 대부분의 C 코드 문법을 C#에 맞게 변환하느라 네이밍 룰이 엉망입니다. ^^; 그래도 분석하기에는 제가 변환한 C# 버전이 더 편안하지 않을까 싶어 올려 봤습니다. ^^ 정성태 2023-04-27 09시14분 ScriptDOM .NET library for T-SQL parsing is now open source; https://techcommunity.microsoft.com/t5/azure-sql-blog/scriptdom-net-library-for-t-sql-parsing-is-now-open-source/ba-p/3804284-------------------------------AZHenley/teenytinycompiler; https://github.com/AZHenley/teenytinycompilerLet's make a Teeny Tiny compiler, part 1; https://austinhenley.com/blog/teenytinycompiler1.htmlLet's make a Teeny Tiny compiler, part 2; https://austinhenley.com/blog/teenytinycompiler2.htmlLet's make a Teeny Tiny compiler, part 3; https://austinhenley.com/blog/teenytinycompiler3.html 정성태 ... 106 107 108 109 110 111 112 113 114 115 116 [117] 118 119 120 ... NoWriterDateCnt.TitleFile(s) 11034정성태8/25/201625604개발 환경 구성: 296. .NET Core 프로젝트를 NuGet Gallery에 배포하는 방법 [2]11033정성태8/24/201623521오류 유형: 353. coreclr 빌드 시 error C3249: illegal statement or sub-expression for 'constexpr' function11032정성태8/23/201622715개발 환경 구성: 295. 최신의 Visual C++ 컴파일러 도구를 사용하는 방법 [1]11031정성태8/23/201618796오류 유형: 352. Error encountered while pushing to the remote repository: Response status code does not indicate success: 403 (Forbidden).11030정성태8/23/201621968VS.NET IDE: 111. Team Explorer - 추가한 Git Remote 저장소가 Branch에 보이지 않는 경우11029정성태8/18/201629260.NET Framework: 602. Process.Start의 cmd.exe에서 stdin만 redirect 하는 방법 [1]111028정성태8/15/201622277오류 유형: 351. Octave 설치 시 JRE 경로 문제11027정성태8/15/201624025.NET Framework: 601. ElementHost 컨트롤의 메모리 누수 현상11026정성태8/13/201625162Math: 19. 행렬 연산으로 본 해밍코드11025정성태8/12/201623976개발 환경 구성: 294. .NET Core 프로젝트에서 "Copy to Output Directory" 처리 [1]11024정성태8/12/201623188오류 유형: 350. "nProtect GameMon" 실행 중에는 Visual Studio 디버깅이 안됩니다! [1]11023정성태8/10/201624737개발 환경 구성: 293. Azure 구독 후 PaaS 서비스 만들어 보기11022정성태8/10/201625262개발 환경 구성: 292. Azure Cloud Service 배포시 사용자 정의 작업을 추가하는 방법11021정성태8/10/201622124오류 유형: 349. System.Runtime.Remoting.RemotingException - Type '..., ..., Version=..., Culture=neutral, PublicKeyToken=null' is not registered for activation [2]11020정성태8/10/201625167VC++: 98. 원본과 대상 버퍼가 같은 경우 memcpy, wmemcpy 주의점11019정성태8/10/201642007기타: 60. 도서: 시작하세요! C# 6.0 프로그래밍: 기본 문법부터 실전 예제까지 (2쇄 정오표)11018정성태8/9/201626189.NET Framework: 600. 단일 메서드 내에서의 할당으로 알아보는 자바와 닷넷의 GC 차이점 [1]11017정성태8/9/201627477웹: 33. HTTP 쿠키에 한글 값을 설정하는 방법11016정성태8/7/201625491개발 환경 구성: 291. Windows Server Containers 소개11015정성태8/7/201623793오류 유형: 348. Windows Server 2016 TP5에서 Windows Containers의 docker run 실행 시 encountered an error during Start failed in Win3211014정성태8/6/201624552오류 유형: 347. Hyper-V Virtual Machine Management service Account does not have permission to open attachment11013정성태8/6/201635348개발 환경 구성: 290. Windows 10에서 경험해 보는 Windows Containers와 docker [4]11012정성태8/6/201625402오류 유형: 346. Windows 10에서 Windows Containers의 docker run 실행 시 encountered an error during CreateContainer failed in Win32 발생11011정성태8/6/201626910기타: 59. outlook.live.com 메일 서비스의 아웃룩 POP3 설정하는 방법11010정성태8/6/201623957기타: 58. Outlook에 설정한 SMTP/POP3(예:천리안 메일) 계정 암호를 잊어버린 경우11009정성태8/3/201629142개발 환경 구성: 289. 2016-08-02부터 시작된 윈도우 10 1주년 업데이트에서 Bash Shell 사용 [8] ... 106 107 108 109 110 111 112 113 114 115 116 [117] 118 119 120 ...