Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #26796 > unrolled thread

Re: Definition of a script in JavaScript

Started byAndreas Bergmaier <andber93@web.de>
First post2015-02-04 20:45 +0100
Last post2015-02-04 22:14 +0100
Articles 3 — 2 participants

Back to article view | Back to comp.lang.javascript

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Definition of a script in JavaScript Andreas Bergmaier <andber93@web.de> - 2015-02-04 20:45 +0100
    Re: Definition of a script in JavaScript Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-02-04 21:48 +0100
      Re: Definition of a script in JavaScript Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-02-04 22:14 +0100

#26796 — Re: Definition of a script in JavaScript

FromAndreas Bergmaier <andber93@web.de>
Date2015-02-04 20:45 +0100
SubjectRe: Definition of a script in JavaScript
Message-ID<matstc$fsj$1@news.albasani.net>
Stefan Ram schrieb:
>    I want to use JavaScript® - not ECMAScript, so my reference is
>    the Mozilla Developer Network (MDN).
>
>    […]
>    So, there must be some syntax rule (grammar rule) for what
>    one can write into a script and what not.

Yeah, but it might not be documented in the MDN.

>    I am trying to find this grammar rule.

I think the closest you will get is from 
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements, 
first sentence:

| JavaScript applications consist of statements […].

If you want to look further, you're encouraged to look at the ECMAScript 
definition of "program code".

>    So far, I only found this in the MDN:
>
>        »The HTML <script> element is used to embed or reference an
>        executable script within an HTML or XHTML document.«
>        ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
>    But were is the definition of »executable script«?

Notice that a HTML "executable script" might not be a JavaScript script. 
There are many other scripting languages.

Regards,
  Bergi

[toc] | [next] | [standalone]


#26799

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2015-02-04 21:48 +0100
Message-ID<3174128.WZNqqLKTKN@PointedEars.de>
In reply to#26796
Andreas Bergmaier wrote:

> Stefan Ram schrieb:
>>    I am trying to find this grammar rule.
> 
> I think the closest you will get is from
> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements,
> first sentence:
> 
> | JavaScript applications consist of statements […].
> 
> If you want to look further, you're encouraged to look at the ECMAScript
> definition of "program code".

There is no such definition, however the ECMAScript Language Specification, 
5.1 Edition, section 5.1.4, “The Syntactic Grammar”, is a good starting 
point:

<http://people.mozilla.org/~jorendorff/es5.1-final.html#sec-5.1.4>

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#26800

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2015-02-04 22:14 +0100
Message-ID<2205314.yR5iCY3o5K@PointedEars.de>
In reply to#26799
Thomas 'PointedEars' Lahn wrote:

> Andreas Bergmaier wrote:
>> If you want to look further, you're encouraged to look at the ECMAScript
>> definition of "program code".
> 
> There is no such definition, however the ECMAScript Language
> Specification, 5.1 Edition, section 5.1.4, “The Syntactic Grammar”, is a
> good starting point:
> 
> <http://people.mozilla.org/~jorendorff/es5.1-final.html#sec-5.1.4>

or <http://ecma-international.org/ecma-262/5.1/#sec-5.1.4>

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web