2001-12-03 10:58:18 +03:00
|
|
|
Build instructions from pschwartau@netscape.com as of 2 Dec 2001 ...
|
|
|
|
|
|
|
|
Building JS2 on WINNT:
|
|
|
|
---------------------------------------------------------------------------------------------
|
|
|
|
[/d/JS_2] cvs -z3 co mozilla/js2
|
|
|
|
cvs -z3 co mozilla/js/src/fdlibm
|
|
|
|
|
2001-12-12 03:24:17 +03:00
|
|
|
Compiling in Visual C++:
|
2001-12-03 10:58:18 +03:00
|
|
|
|
|
|
|
Workspace: D:\JS_2\mozilla\js2\src\winbuild\dikdik.dsw
|
|
|
|
|
|
|
|
Project Files: D:\JS_2\mozilla\js2\src\winbuild\DikDik.dsp
|
|
|
|
D:\JS_2\mozilla\js2\tests\cpp\winbuild\DikDik_shell.dsp <---------- active project
|
|
|
|
D:\JS_2\mozilla\js2\src\winbuild\fdlibm.dsp
|
|
|
|
|
|
|
|
|
|
|
|
RUNNING THE JS2 SHELL AFTER YOU'VE BUILT IT:
|
2001-12-12 03:24:17 +03:00
|
|
|
(Note the 3 underbars between "shell" and "Win32" in "DikDik_shell___Win32_Debug")
|
|
|
|
cd (path to)/mozilla/js2/tests/cpp/winbuild/DikDik_shell___Win32_Debug
|
|
|
|
[(path to)/mozilla/js2/tests/cpp/winbuild/DikDik_shell___Win32_Debug] ./DikDik_shell.exe
|
2001-12-03 10:58:18 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Building JS2 on LINUX:
|
|
|
|
---------------------------------------------------------------------------------------------
|
|
|
|
[/d/JS_2] cvs -z3 co mozilla/js2
|
2001-12-12 03:24:17 +03:00
|
|
|
cvs -z3 co mozilla/js/src/fdlibm
|
2001-12-03 10:58:18 +03:00
|
|
|
|
|
|
|
[/d/JS_2] cd mozilla/js2
|
|
|
|
|
|
|
|
[/d/JS_2/mozilla/js2] automake <--- FIRST TIME ONLY
|
|
|
|
[/d/JS_2/mozilla/js2] autoconf <--- FIRST TIME ONLY
|
|
|
|
[/d/JS_2/mozilla/js2] ./configure --enable-debug <--- FIRST TIME ONLY
|
|
|
|
[/d/JS_2/mozilla/js2] make
|
|
|
|
|
|
|
|
|
2001-12-12 03:24:17 +03:00
|
|
|
RUNNING THE JS2 SHELL AFTER YOU'VE BUILT IT:
|
|
|
|
cd (path to)/mozilla/js2/tests/cpp
|
|
|
|
[ (path to)/mozilla/js2/tests/cpp] ./dikdik
|
|
|
|
|
|
|
|
|
2001-12-03 10:58:18 +03:00
|
|
|
|
|
|
|
Building JS2 on MAC 9.1
|
|
|
|
---------------------------------------------------------------------------------------------
|
|
|
|
Get updated CodeWarrior Pro 7 tools !
|
|
|
|
|
|
|
|
Open (path to):mozilla:js2:tests:cpp:macbuild:js2_shell.mcp and build it.
|
|
|
|
There is also (path to ):mozilla:js2:tests:cpp:macbuild:parser_test.mcp, if you just want to try out the full parser
|
|
|
|
without getting complaints about unimplemented features from the back end.
|
|
|
|
|
|
|
|
|
2001-12-12 03:24:17 +03:00
|
|
|
RUNNING THE JS2 SHELL AFTER YOU'VE BUILT IT:
|
|
|
|
cd (path to):mozilla:js2:tests:cpp:macbuild
|
|
|
|
[ (path to):mozilla:js2:tests:cpp:macbuild] ./js2_shell
|
|
|
|
|
2001-12-03 10:58:18 +03:00
|
|
|
|
2001-12-12 03:24:17 +03:00
|
|
|
---------------------------------------------------------------------------------------------
|
2001-12-03 10:58:18 +03:00
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
// The stuff below looks pretty out of date to me.
|
|
|
|
// I wonder if it shouldn't just be removed
|
|
|
|
|
initial checkin for source reorg. leaf copied mozilla/js/js2 to mozilla/js2/src, mozilla/js/js2/jsc to mozilla/js2/jsc, mozilla/js/js2/tools to mozilla/js2/tools, and mozilla/js/semantics to mozilla/js2/semantics
unix now has an autoconf based make system. currently the new make system only makes parser related files, back end stuff to be added soon.
mac and windows makesystems will be checked in next.
parser.cpp has been factored into token.*, lexer.*, and parser.*
utilities.cpp has been factored into formatter.*, exception.*, mem.*, strings.*,ds.h, stlcfg.h, and algo.h
2001-02-08 00:21:22 +03:00
|
|
|
parse functions
|
|
|
|
parseIdentifierQualifiers(ExprNode *e, bool &foundQualifiers,
|
|
|
|
parseParenthesesAndIdentifierQualifiers(const Token &tParen,
|
|
|
|
parseQualifiedIdentifier(const Token &t, bool preferRegExp)
|
|
|
|
parseArrayLiteral(const Token &initialToken)
|
|
|
|
parseObjectLiteral(const Token &initialToken)
|
|
|
|
parsePrimaryExpression()
|
|
|
|
parseMember(ExprNode *target, const Token &tOperator,
|
|
|
|
parseInvoke(ExprNode *target, uint32 pos,
|
|
|
|
parsePostfixExpression(bool newExpression)
|
|
|
|
parseUnaryExpression()
|
|
|
|
parseExpression(bool noIn, bool noAssignment, bool noComma)
|
|
|
|
parseParenthesizedExpression()
|
|
|
|
parseTypeExpression(bool noIn)
|
|
|
|
parseTypedIdentifier(ExprNode *&type)
|
|
|
|
parseTypeBinding(Token::Kind kind, bool noIn)
|
|
|
|
parseTypeListBinding(Token::Kind kind)
|
|
|
|
parseVariableBinding(bool noQualifiers, bool noIn)
|
|
|
|
parseFunctionName(FunctionName &fn)
|
|
|
|
parseFunctionSignature(FunctionDefinition &fd)
|
|
|
|
parseBlock(bool inSwitch, bool noCloseBrace)
|
|
|
|
parseBody(SemicolonState *semicolonState)
|
|
|
|
parseAttributeStatement(uint32 pos, IdentifierList *attributes,
|
|
|
|
parseAttributesAndStatement(const Token *t, AttributeStatement as,
|
|
|
|
parseAnnotatedBlock()
|
|
|
|
parseFor(uint32 pos, SemicolonState &semicolonState)
|
|
|
|
parseTry(uint32 pos)
|
|
|
|
parseStatement(bool /*topLevel*/, bool inSwitch,
|
|
|
|
parseStatementAndSemicolon(SemicolonState &semicolonState)
|
|
|
|
parseIdentifier()
|
|
|
|
parseLiteralField()
|
|
|
|
parseFieldName()
|
|
|
|
parseArgumentList(NodeQueue<ExprPairList> &args)
|
|
|
|
parseArgumentListPrime(NodeQueue<ExprPairList> &args)
|
|
|
|
parseNamedArgumentListPrime(NodeQueue<ExprPairList> &args)
|
|
|
|
parseAllParameters(FunctionDefinition &fd,
|
|
|
|
parseOptionalNamedRestParameters (FunctionDefinition &fd,
|
|
|
|
parseNamedRestParameters(FunctionDefinition &fd,
|
|
|
|
parseNamedParameters(FunctionDefinition &fd,
|
|
|
|
parseRestParameter()
|
|
|
|
parseParameter()
|
|
|
|
parseOptionalParameter()
|
|
|
|
parseOptionalParameterPrime(VariableBinding *first)
|
|
|
|
parseNamedParameter(NodeQueue<IdentifierList> &aliases)
|
|
|
|
parseResultSignature()
|
|
|
|
|
|
|
|
|
|
|
|
1/28/01
|
|
|
|
|
|
|
|
Files:
|
|
|
|
|
|
|
|
cpucfg.h
|
|
|
|
|
|
|
|
formatter.cpp formatter.h
|
|
|
|
"Formatter" class, iostream like wrapper around stdio.
|
|
|
|
|
|
|
|
gc_allocator.h, gc_container.h
|
|
|
|
boehm gc stuff.
|
|
|
|
|
|
|
|
hash.cpp hash.h
|
|
|
|
a hash
|
|
|
|
|
|
|
|
lexer.cpp lexer.h
|
|
|
|
main lexer.
|
|
|
|
|
|
|
|
mem.cpp mem.h
|
|
|
|
zone, arena, and pool classes for memory management.
|
|
|
|
|
|
|
|
nodefactory.h
|
|
|
|
parse node factory.
|
|
|
|
|
|
|
|
numerics.cpp numerics.h
|
|
|
|
numbers and stuff.
|
|
|
|
|
|
|
|
parser.cpp parser.h
|
|
|
|
main parser source.
|
|
|
|
tables in parser.h:
|
|
|
|
enum ExprNode::Kind; types of expressions
|
|
|
|
enum StmtNode::Kind; types of statements
|
|
|
|
|
|
|
|
|
|
|
|
reader.cpp reader.h
|
|
|
|
"Reader" class, feeds source to the parser/lexer.
|
|
|
|
|
|
|
|
stlcfg.h
|
|
|
|
stupid stl tricks
|
|
|
|
.
|
|
|
|
systemtypes.h
|
|
|
|
basic typedefs.
|
|
|
|
|
|
|
|
token.cpp token.h
|
|
|
|
token class.
|
|
|
|
|
|
|
|
utilities.cpp utilities.h
|
|
|
|
random things.
|
|
|
|
|
|
|
|
world.cpp world.h
|
|
|
|
the whole world.
|