[ 
https://issues.apache.org/jira/browse/DAFFODIL-1437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17342999#comment-17342999
 ] 

Sandeep Kumar commented on DAFFODIL-1437:
-----------------------------------------

Thank you Steve. I have completed project setup. Can you please help me from 
where i can get started on this ticket?

> Clarity: DFA Rules - eliminate anonymous classes and functions
> --------------------------------------------------------------
>
>                 Key: DAFFODIL-1437
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-1437
>             Project: Daffodil
>          Issue Type: Improvement
>          Components: Back End, Clean Ups
>            Reporter: Mike Beckerle
>            Priority: Major
>
> This is a lisp sort of thing to do as written, but there really is no reason 
> these can't be ordinary objects  with two methods, test and act. The code 
> would be clearer and easier to debug. Particularly if the classes have names 
> like 
> {code}
> final class StartState(states: => ArrayBuffer[State], val stateNum: Int) 
> extends State(states) {
>    type R = Registers // put into State base class, protected
>    object Got_EC_goto_ESCState extends Rule {
>        def test(r: R) = { ... }
>        def act(r: R) = { ... }
>      }
>   object Got_EEC_goto_ESCESCState extends Rule {
>        def test(r: R) = { ... }
>        def act(r: R) = { ... }
>      }
> ...
>   override val rules = ArrayBuffer(
>      Got_EC_goto_ESCState, 
>      Got_EEC_goto_EECState,
>     ...
>   )
> ...
> }
> {code}
> In the above, the nesting makes it clear each "Rule" which is a state-machine 
> transition, originates at a particular state.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to