Questions tagged [ecma262]

ECMA-262 is a Standard defining the ECMAScript scripting language also known as JavaScript.

ECMA-262 is a Standard defining the ECMAScript scripting language also known as JavaScript. For complete reference read the standard it self at: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf

145 questions
4
votes
4 answers

ECMA- / Javascripts Array.prototype.forEach

Javascript (ECMAscript) supports the Array.prototype.forEach method since version 1.6 (ECMAscript edition 3, 2005). So quite a lot of browser already support that method and it's incredibly fast in comparison to jQuery's $.each() method for…
jAndy
  • 231,737
  • 57
  • 305
  • 359
4
votes
4 answers

Many names of JavaScript / ECMA

I was looking up newer functions of JavaScript and found ECMAScript/ECMA 5. Because I had never heard of it I looked in to it more and found that it comes in the form of different names such as: JavaScript, JScript (Microsofts Variation),…
Tom
4
votes
1 answer

Where is the immutable binding record of the identifier in a named function expression stored in JavaScript?

Recently I ran into some interesting facts about named function expressions (NFE). I understand that the function name of an NFE can be accessed within the function body, which makes recursion more convenient and saves us arguments.callee. And the…
4
votes
1 answer

Possible typos in ECMAScript 5 specification?

Does anybody know why, at the end of section 7.6 of the ECMA-262, 5th Edition specification, the nonterminals UnicodeLetter, UnicodeCombiningMark, UnicodeDigit, UnicodeconnectorPunctuation, and UnicodeEscapeSequence are not followed by two…
Andy West
  • 12,302
  • 4
  • 34
  • 52
4
votes
1 answer

Push and pop on a frozen array in Chrome not throwing an exception

The following code does not seem to run as expected under Chrome, and runs differently in Firefox. (function () { 'use strict'; var arr = Object.freeze([1, 2, 3]); try { arr.push(4); } catch (e) { console.log(e); } try { …
4
votes
2 answers

ANTLR parser hanging at proxy.handshake call

I am attempting to get a basic ECMAScript parser working, and found a complete ANTLR grammar for ECMAScript 3, which appears to compile ok and produces the appropriate Lexer/Parser/Walker Java files. (Running inside ANTLR IDE plugin for Eclipse…
Peter Boughton
  • 110,170
  • 32
  • 120
  • 176
4
votes
2 answers

Does a real ECMAScript implementation exist, or is it just a spec?

I read both of the links below http://en.wikipedia.org/wiki/ECMAScript What is the difference between JavaScript and ECMAScript? My question is, does ECMAScript exist as something I can download and use instead of JavaScript?
rajakvk
  • 9,775
  • 17
  • 46
  • 49
3
votes
3 answers

Which ECMA-262 (ECMAScript/JavaScript) reference should I use?

The more I read JavaScript Q&A, the more I come across references to the ECMA-262 sleeping medication reference. I've seen some as HTML in addition to the official pdf. I'd like to link to the HTML references, but I'm hesitant because I don't have…
zzzzBov
  • 174,988
  • 54
  • 320
  • 367
3
votes
4 answers

Use of reserved words in Javascript

In Javascript there are various reserved words that cannot be used inside Identifiers; some of those are actually reserved for future use. To clarify a bit, an Identifier is an Identifier Name but not a reserved word. The exact grammar of identifier…
Andrea
  • 20,253
  • 23
  • 114
  • 183
3
votes
1 answer

JavaScript Object property lookup - does syntax matter?

This is a basic question about the JavaScript (ECMAScript) language so I apologize in advance if it's a duplicate (a little searching didn't reveal my exact question). In ECMAScript we can use two basic syntactic forms to get/set properties on an…
maerics
  • 151,642
  • 46
  • 269
  • 291
3
votes
2 answers

Rhino features beyond the ECMA standard?

I'm starting with JavaScript and the Rhino engine. I know the ECMAScript 262 specification. I need to know what features, e.g. functions/objects/etc are defined by the Rhino JavaScript engine beyond the ECMA standard. Most examples just feature…
Peter Kofler
  • 9,252
  • 8
  • 51
  • 79
3
votes
1 answer

Is '\0' followed by a decimal digit in string allowed in ECMA-262 strict mode?

According to the ECMA-262 specification (6th edition) in strict mode in single or double quoted strings after '\' it is possible to have EscapeSequence or LineTerminatorSequence, and EscapeSequence must be one of the following:…
user4699276
  • 120
  • 1
  • 6
3
votes
1 answer

Check if object is a constructor - IsConstructor

I want to check if a JavaScript value is a constructor, that is, if it has a [[Construct]] internal method. ECMAScript defines IsConstructor, which does exactly this, but it's an internal operation. So I want to emulate it. I thought about…
Oriol
  • 274,082
  • 63
  • 437
  • 513
3
votes
2 answers

What is the name of this technique?

I just finished writing a date parser for my ECMAScript implementation. Previously I had written a regular expressions compiler and I was really impressed with the way the spec described the process. Essentially the input is passed through a series…
ChaosPandion
  • 77,506
  • 18
  • 119
  • 157
3
votes
1 answer

I need help translating this portion of the ECMAScript grammar?

I've been working on my own implementation of ECMAScript for quite some time now. I have basically done everything by hand to help gain a deep understanding of the process. Repeated attempts to analyze and understand this portion of the grammar have…
ChaosPandion
  • 77,506
  • 18
  • 119
  • 157