Hi there,

I wanne dive a bit more deep into the clojure compiler and I wonder whether 
it follows the std procedure for compiled languages

Character Stream -> Scanner (lexical analysis) -> Token Stream
Token Stream -> Parser (syntax analysis) -> Parse Tree
Parse Tree -> Semantic Analysis -> Abstract Syntax Tree (AST)
(Optional) AST -> Machine Independent code improvement) -> Modified AST
Modified AST -> Target Code Generation -> Target Language (here Java Byte 
Code)

Thanks for hints and references regarding this topic. Literature on this 
topic (e.g.  O'Reilly Clojure Programming by Emerick, Carper et Grand) 
states that clojure programs are written using clojure datastructures and 
directly represent an AST. But a task of semantic analysis is to check 
whether a statement given in the programming language is valid in terms of 
the programming language semantics. So some component has to check whether 
the symbol foo in the list (foo "baz") denotes either a static function 
applicable to a string literal or a instance function of the string literal 
itself. Which component serves this job?

thanks & cheers

christian

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to