i wanted to verify my understanding of the "Parse node" in the ECMA-262 spec.
so whenever an ECMAScript program starts, it goes through the lexical grammar phase which basically convert the source text into input elements(That is tokens, line terminators, comments, or white space)
after that, the stream of input elements is parsed by The Syntactic Grammar.
The Syntactic Grammar constructs a parse tree from those input elements. the parse tree is made up of Parse Nodes
and from my understanding what it basically means is that those Parse Nodes are basically the Nonterminal and Terminal symbols however the way i think of Parse Nodes is that they sort of referring to the specific Nonterminal and Terminal symbols in the parse tree
they are like "objects" of a Nonterminal symbols and a terminal symbols.
every algorithm in the spec that uses the Nonterminal symbols like:
- Perform BlockDeclarationInstantiation(StatementList, blockEnv).
or even a variable:
Let lexNames be the LexicallyDeclaredNames of script.
is basically referring to a Parse Node(specific Nonterminal in tree) in the parse tree
and that basically it...
They can be a terminal and nonterminal symbols but they are specific(nonterminal or terminal) at certain position in the parse tree
anyone ?