1.1 --- a/src/share/classes/com/sun/tools/javac/parser/ParserFactory.java Wed Nov 14 16:41:51 2012 -0800 1.2 +++ b/src/share/classes/com/sun/tools/javac/parser/ParserFactory.java Wed Nov 14 17:23:10 2012 -0800 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -25,7 +25,10 @@ 1.11 1.12 package com.sun.tools.javac.parser; 1.13 1.14 +import java.util.Locale; 1.15 + 1.16 import com.sun.tools.javac.code.Source; 1.17 +import com.sun.tools.javac.tree.DocTreeMaker; 1.18 import com.sun.tools.javac.tree.TreeMaker; 1.19 import com.sun.tools.javac.util.Context; 1.20 import com.sun.tools.javac.util.Log; 1.21 @@ -54,26 +57,30 @@ 1.22 } 1.23 1.24 final TreeMaker F; 1.25 + final DocTreeMaker docTreeMaker; 1.26 final Log log; 1.27 final Tokens tokens; 1.28 final Source source; 1.29 final Names names; 1.30 final Options options; 1.31 final ScannerFactory scannerFactory; 1.32 + final Locale locale; 1.33 1.34 protected ParserFactory(Context context) { 1.35 super(); 1.36 context.put(parserFactoryKey, this); 1.37 this.F = TreeMaker.instance(context); 1.38 + this.docTreeMaker = DocTreeMaker.instance(context); 1.39 this.log = Log.instance(context); 1.40 this.names = Names.instance(context); 1.41 this.tokens = Tokens.instance(context); 1.42 this.source = Source.instance(context); 1.43 this.options = Options.instance(context); 1.44 this.scannerFactory = ScannerFactory.instance(context); 1.45 + this.locale = context.get(Locale.class); 1.46 } 1.47 1.48 - public Parser newParser(CharSequence input, boolean keepDocComments, boolean keepEndPos, boolean keepLineMap) { 1.49 + public JavacParser newParser(CharSequence input, boolean keepDocComments, boolean keepEndPos, boolean keepLineMap) { 1.50 Lexer lexer = scannerFactory.newScanner(input, keepDocComments); 1.51 return new JavacParser(this, lexer, keepDocComments, keepLineMap, keepEndPos); 1.52 }