Which nonterminal is the start symbol?

56 Views Asked by At

While i was reading the spec(ECMAScript 2022) i've wondered which nonterminal symbol is the start symbol ? in other words the first place that is being evaluated in ECMAScript 2022

1

There are 1 best solutions below

0
Jonas Wilms On BEST ANSWER

It depends. The abstract operation ParseText is called from 14 places, with different goalSymbols (from the perspective of a bottom-up parser the start symbol of the generative grammar is the goal). The call you are probably looking for comes from ParseScript and passes in the Script non-terminal symbol (though it might also be Module passed in from ParseModule).