As I am going through learning about compilation , what I see is the approach to the subject through machines , known as automata , which change from one state to another depending on the input provided to them . And there is an accepting state in the automata , which when reached indicates a valid language input .

I wonder how was the process of translation of a language into another language conceived as a problem about machines changing states ? What was the intuition behind this approach to compile/translate languages ?

P.S : I got a reply that the automata part is only for the lexer generator . Even for the lexer generator part , I need to know how was the idea of automata conceived as a solution to approach this problem . That may definitely form an important clue to questions like the following :

  1. How many minimum states in an automata do we need for a language of specific size (no of independent entities maybe ? ) ?

  2. How many accepting states and epsilon transitions are required in an automata ?

    1. What should be the geometry of the automata ? (For the lack of a better word for the set of transitions in an automata , I used the word geometry)
  • $\begingroup$ The automata part is maily to get from a string to a syntax tree. Then you only work on the tree because it's easier (and print the tree back to a string at the end). You may want to take a look at transducers though. $\endgroup$
    – xavierm02
    Oct 2 '17 at 17:33
  • $\begingroup$ @xavierm02 : Even for that , how can this idea of automata be naturally conceived ? $\endgroup$ Oct 21 '17 at 16:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.