1

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

AngryJohn
  • 576
  • 4
  • 10

1 Answers1

3

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

Jonas Wilms
  • 132,000
  • 20
  • 149
  • 151