Author Topic: Parsing AST  (Read 3108 times)

StH

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Parsing AST
« on: November 20, 2015, 03:00:34 am »
Hello,

I'm very new to the forum, so please be patient with me  ;)
I've got a question for working with the abstract syntax tree. I managed to build a tree from a special kind of source code. But the difficulty is, that the syntax of the read source allows tiled objects.
Let's say, I built a node named A with 3 parameters.
Later in the file the node A is allowed to be referenced again and 2 additional parameter have to be added.
During building the grammar I wasn't be aware of this fact.
So my syntax tree now has 2 nodes with the same name, the first contains the first 3 parameters, the second one the both of the file later.
My question is, is there a mechanism foreseen for "optimizing" the AST after building?

Thanks in advance for your help
And please excuse my bad english ... I hope I managed to articulate my problem clearly.

Best regards
Stephan