Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

71
Views
confusion in ecmascript productions

I've been confused lately about productions in ecma262 spec.

There are productions based on my assumption that can be other productions.

for example, Statement

Statement can be a Block it can also be an IfStatement.

my confusion begins with algorithms that looks like that

a. Let stmtCompletion be the result of evaluating the first Statement.

evaluating Statement? What does it mean?

if a Statement, for example, is an IfStatement will it go to the 14.6 The if Statement 14.6.2 Runtime Semantics: Evaluation ?

I'm mostly confused because there are productions that have their RS: Evaluation like IfStatement and some don't have the RS: Evaluation like Statement,Declaration, etc...

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

If a Statement, for example, is an IfStatement will it go to the 14.6 The if Statement 14.6.2 Runtime Semantics: Evaluation ?

Yes.

I'm mostly confused because there are productions that have their RS: Evaluation like IfStatement and some don't have the RS: Evaluation like Statement,Declaration, etc...

What does it mean?

This is (in recent revisions of the spec) even explained in §5.2.2 Syntax-Directed Operations. In particular,

Unless explicitly specified otherwise, all chain productions have an implicit definition for every operation that might be applied to that production's left-hand side nonterminal. The implicit definition simply reapplies the same operation with the same parameters, if any, to the chain production's sole right-hand side nonterminal and then returns the result. For example, assume that some algorithm has a step of the form: “Return the result of evaluating Block” and that there is a production:

Block : { StatementList }

but the Evaluation operation does not associate an algorithm with that production. In that case, the Evaluation operation implicitly includes an association of the form:

Runtime Semantics: Evaluation

Block : { StatementList }

  1. Return the result of evaluating StatementList.

So since there are no "Runtime Semantics: Evaluation" for the Statement production, it gets implicit semantics that will simply evaluate the respective statement kind.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!