2016-05-20 13:01 GMT+03:00 sangeeta lal <sangeeta.6...@gmail.com>:
> Dear Sir,
>
> *Thanks for your reply!*
>
> Could you please tell me,  if there is any listing about all the  auto-
> generated files. I have manually identified 59 files in the folder "
> *tomcat\java\org\apache\el\parser*" which are auto generated.

ELParser.jjt is the source.

ELParser.java was generated.
Some helper classes (Node.java, SimpleNode.java, ..) are generated /
provided by the tool.

The Ast* files - a stub was generated, but the rest is written by a
human developer.

ELParser.html is a report from generation tool.


Java CC site has a manual, with examples.
https://javacc.java.net/doc/docindex.html
https://javacc.java.net/doc/JJTree.html

In short, JavaCC is a lexical parser that can perform some Java code
when some lexical element is encountered. Coupling it with JJTree
turns that Java code into code that produces a tree of Node elements.

The behaviour of those nodes it then programmed by a human.  My
understanding is that by default those Ast classes have only a
constructor, but no other methods.  Some methods are declared in
SimpleNode class and can be overridden in specific classes, e.g.
AstIdentifier overrides setImage().

Some of default classes were edited by adding additional methods. E.g.
methods with an EvaluationContext argument in SimpleNode class were
added.


> I have following two questions:
>
> 1. Can tomcat project have auto-generated files in some other folder also?
> 2. Is the "JavaCC" only tool which is used to auto-generate the files ? or
> there are some other tools as well?
>

There are some classes from other projects that are preprocessed (by
renaming the packages) and recompiled.

All versions of Tomcat do so for Apache Commons Logging library when
it is built as an "extras" package.

See <target name="extras-commons-logging" in build.xml. It is just
textual replacement, with

    <replace 
dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/src/main/java/org/apache/commons"
        encoding="ISO-8859-1">
      <replacefilter token="org.apache.commons"
            value="org.apache.juli" />
    </replace>



Older versions of Tomcat also did so for Apache Commons Pool and
Apache Commons DBCP libraries, but Tomcat 8.0 and later has an own
copy of those libraries in it source tree.


This is about *.java files. There is also documentation (xml -> html),
javadoc (java -> html).


The mailing list rules:
http://tomcat.apache.org/lists.html#tomcat-users
-> 6. Top-posting is bad.


Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to