concrete-syntax-tree

Parse tree and grammars information

Do anyone know where to find good online resources with examples how to make grammars and parsetrees? Preferebly introductary materials. Info that is n00b friendly, haven't found anything good with google myself. edit: I'm thinking about theory, not a specific parser software. ...

What is the difference between an Abstract Syntax Tree and a Concrete Syntax Tree?

I've been reading a bit about how interpreters/compilers work, and one area where I'm getting confused is the difference between an AST and a CST. My understanding is that the parser makes a CST, hands it to the semantic analyzer which turns it into an AST. However, my understanding is that the semantic analyzer simply ensures that rul...

What do I do with a Concrete Syntax Tree?

I'm using pyPEG to create a parse tree for a simple grammar. The tree is represented using lists and tuples. Here's an example: [('command', [('directives', [('directive', [('name', 'retrieve')]), ('directive', [('name', 'commit')])]), ('filename', [('name', 'f30502')])])] My question is what do I do with...

How is a NullLiteral represented in tree form?

According to the ECMAScript specification in section 7.8.1 a NullLiteral is defined as follows: NullLiteral :: null What I am trying to understand is how this is represented in tree form when a NullLiteral is included in the following productions found in sections 7.6.1 and 7.8. ReservedWord :: Keyword FutureReserved...