on 3/31/2015 10:57 PM
Just before Christmas I came across some Java source code by “Uncle” Bob Martin aimed at “demystifying compilers” which expends about 600 lines of code to parse the following simple finite state machine: Actions: Turnstile FSM: OneCoinTurnstile Initial: Locked { Locked Coin Unlocked {alarmOff unlock} Locked Pass Locked alarmOn Unlocked Coin Unlocked thankyou Unlocked Pass Locked lock } For fun I knocked up a broadly equivalent parser in F# using FParsec which was just under 40 lines of code, and posted [...]
>> Read the full article on trelford.com
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper