Solved

Bison/yacc grammar for ECMA Scrip (javascript)

Posted on 2008-10-18
3
2,932 Views
Last Modified: 2013-11-18
Hi,
   I have to write a lex/flex and Bison/yacc grammar for javascripts. Since javascripts follows ECMA Script specification, I have to write a lex/flex and Bison/yacc grammar from ECMA Scripts. Anybody knows grammar or any link where I can get grammar for ECMA Script.

Thanks in advance,
0
Comment
Question by:anton_shiban
  • 2
3 Comments
 
LVL 53

Accepted Solution

by:
Infinity08 earned 500 total points
ID: 22756145
Not one specifically for Yacc, but take a look at Scriptonite :

        http://sourceforge.net/projects/scriptonite/

which contains a full ECMAScript grammar.


This page links to several grammars for ANTLR :

        http://www.antlr.org/grammar/list

Have a look through it - there are several for ECMAScript, JavaScript.
0
 
LVL 53

Expert Comment

by:Infinity08
ID: 22756158
And here's the ECMAScript standard :

        http://www.ecma-international.org/publications/standards/Ecma-262.htm

Which contains the grammar in appendix A.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question