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
Advertisement
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).