Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re (2): Can awk easily simulate an AFSM
> > Apparently my ideas of an AFSM compiler is closer to the 
>
Jürgen Kahrs wrote:
> I wouldnt say it this way. I was only surprised
> that you would prefer the data-driven style.

If you've got a framework that can implement an AFSM,
almost as simply as a spreadsheeet then you can experiment with
all kinds of utilities, like non-perfect translation from C-source to
pascal-family-source.

Perhaps such an AFSM *can* more easily be implemented in
an existing spreadsheet ?!

> A data-driven implementation in canonic AWK may
> look like this:
>
> BEGIN { state = "" }
>
> state == ""   && /IF/     { state = "IF"   ; Encode(...) }
> state == "IF" && /ELSE/   { state = "ELSE" ; Encode(...) }

OK, does this mean:
IF (Presentstate=nil) & (NextToken="if")
THEN "IF" -> Presentstate; Encode(...) END
??

You see it's almost as verbose as my pseudo-code.
I prefer a data-driven approach, because it hides irrelevant information
better.  If you're stepping through a FSM-diagram you don't need to
ask "what is the PresentState" because this info. is known, contained
in the like-program-counter.

IMO the whole idea of using a FSM approach is to hide the confusing
and irrelevant implementation details so that you can concentrate
on the 'data'.

Thanks for feeedback,

== Chris Glur.


Report this thread to moderator Post Follow-up to this message
Old Post
problems@gmail
03-29-08 12:58 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

AWK archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 03:25 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.