| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static int | |
| private static final Pattern |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static boolean | Returns: true if a BOM was found and skipped.Check for a BOM mark at the beginning of stream. |
| private static void | |
| private static String | |
| private static String | Returns: The declared encoding, or null if no encoding declaration is foundReads the first two lines of the reader, searching for an encoding declaration. |
| public static PyException | |
| private static String | |
| private static String | |
| private static mod | parse(ParserFacade.
Internal parser entry point. |
| public static mod | |
| public static mod | |
| public static mod | |
| public static mod | parseExpressionOrModule(Reader reader, String filename, CompilerFlags cflags)
Parse Python source as either an expression (if possible) or module. |
| public static mod | partialParse(String string, CompileMode kind, String filename, CompilerFlags cflags, boolean stdprompt)
|
| private static ParserFacade. | |
| private static ParserFacade. | |
| private static ParserFacade. | prepBufReader(InputStream input, CompilerFlags cflags, String filename, boolean fromString, boolean universalNewlines)
|
| private static ParserFacade. | |
| private static String | |
| private static boolean |
| MARK_LIMIT | back to summary |
|---|---|
| private static int MARK_LIMIT | |
| pep263EncodingPattern | back to summary |
|---|---|
| private static final Pattern pep263EncodingPattern | |
| ParserFacade | back to summary |
|---|---|
| private ParserFacade() | |
| adjustForBOM | back to summary |
|---|---|
| private static boolean adjustForBOM(InputStream stream) throws IOException Check for a BOM mark at the beginning of stream. If there is a BOM mark, advance the stream passed it. If not, reset() to start at the beginning of the stream again. Only checks for EF BB BF right now, since that is all that CPython 2.5 Checks.
| |
| close | back to summary |
|---|---|
| private static void close(BufferedReader reader) | |
| encodingMap | back to summary |
|---|---|
| private static String encodingMap(String encoding) | |
| findEncoding | back to summary |
|---|---|
| private static String findEncoding(BufferedReader br) throws IOException Reads the first two lines of the reader, searching for an encoding declaration. Note that reseting the reader (if needed) is responsibility of the caller.
| |
| fixParseError | back to summary |
|---|---|
| public static PyException fixParseError(ParserFacade. | |
| getLine | back to summary |
|---|---|
| private static String getLine(ParserFacade. | |
| matchEncoding | back to summary |
|---|---|
| private static String matchEncoding(String inputStr) | |
| parse | back to summary |
|---|---|
| private static mod parse(ParserFacade. Internal parser entry point. Users of this method should call fixParseError on any Throwable thrown from it, to translate ParserExceptions into PySyntaxErrors or PyIndentationErrors. | |
| parse | back to summary |
|---|---|
| public static mod parse(Reader reader, CompileMode kind, String filename, CompilerFlags cflags) | |
| parse | back to summary |
|---|---|
| public static mod parse(InputStream stream, CompileMode kind, String filename, CompilerFlags cflags) | |
| parse | back to summary |
|---|---|
| public static mod parse(String string, CompileMode kind, String filename, CompilerFlags cflags) | |
| parseExpressionOrModule | back to summary |
|---|---|
| public static mod parseExpressionOrModule(Reader reader, String filename, CompilerFlags cflags) Parse Python source as either an expression (if possible) or module. Designed for use by a JSR 223 implementation: "the Scripting API does not distinguish between scripts which return values and those which do not, nor do they make the corresponding distinction between evaluating or executing objects." (SCR.4.2.1) | |
| partialParse | back to summary |
|---|---|
| public static mod partialParse(String string, CompileMode kind, String filename, CompilerFlags cflags, boolean stdprompt) | |
| prepBufReader | back to summary |
|---|---|
| private static ParserFacade. | |
| prepBufReader | back to summary |
|---|---|
| private static ParserFacade. | |
| prepBufReader | back to summary |
|---|---|
| private static ParserFacade. | |
| prepBufReader | back to summary |
|---|---|
| private static ParserFacade. | |
| readEncoding | back to summary |
|---|---|
| private static String readEncoding(InputStream stream) throws IOException | |
| validPartialSentence | back to summary |
|---|---|
| private static boolean validPartialSentence(BufferedReader bufreader, CompileMode kind, String filename) | |
| Modifier and Type | Field and Description |
|---|---|
| public final String | encoding
The encoding from the source file, or null if none was specified and ascii is being used. |
| Access | Constructor and Description |
|---|---|
| public |
| encoding | back to summary |
|---|---|
| public final String encoding The encoding from the source file, or null if none was specified and ascii is being used. | |
| ExpectedEncodingBufferedReader | back to summary |
|---|---|
| public ExpectedEncodingBufferedReader(Reader in, String encoding) | |