User loginNavigation |
Is There a Standard Formalism for Describing Abstract Syntax Trees?I'm in a position where I need to describe an algorithm that operates over an abstract syntax tree. In this sense, the language would be that of a simple 'while' language and I'm only interested in statement level detail. An example of what I'm looking for would be a good, mathematically precise description of implementing a control flow graph. Does anyone know of any articles, papers, books with such a discussion? An example:
Program:
A = 0
while A != 10
if A == 5 then
print "hello, 5!"
else
print "waiting for a 5..."
endif
A = A + 1
endwhile
The obvious AST:
[stamentlist]
+[assignment]
+[while]
+[statementlist]
+[if]
+[statementlist]
+[print]
+[statementlist]
+[print]
+[assignment]
By markt at 2008-09-16 17:06 | LtU Forum | previous forum topic | next forum topic | other blogs | 6073 reads
|
Browse archives
Active forum topics |
Recent comments
4 weeks 2 days ago
4 weeks 3 days ago
4 weeks 4 days ago
4 weeks 4 days ago
5 weeks 2 days ago
5 weeks 2 days ago
5 weeks 2 days ago
8 weeks 3 days ago
9 weeks 1 day ago
9 weeks 2 days ago