Package com.yahoo.config.codegen
Class DefParser
java.lang.Object
com.yahoo.config.codegen.DefParser
This class generates a tree of CNodes from a .def file.
- Author:
- gjoranv, hmusum
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidFor debugging - dump the tree from the given root to System.out.getTree()Parses the .def file upon the initial call.
-
Field Details
-
DEFAULT_PACKAGE_PREFIX
- See Also:
-
versionPattern
-
namespacePattern
-
packagePattern
-
-
Constructor Details
-
DefParser
Creates a new parser for a .def file with the given name and that can be accessed by the given reader.- Parameters:
name- The name of the .def file (not including the '.def' suffix).defReader- A reader to the .def file.
-
-
Method Details
-
getTree
Parses the .def file upon the initial call. Subsequent calls returns the result from the initial call.- Returns:
- A tree of CNodes representing this instance's .def file.
- Throws:
CodegenRuntimeException- upon errors.
-
getNormalizedDefinition
-
dumpTree
For debugging - dump the tree from the given root to System.out.
-