| Modifier and Type | Class and Description |
|---|---|
| public class | BstFunctions.
Pops the top two literals and assigns to the first (which must be a global or entry variable) the value of the second. |
| public class | BstFunctions.
Executes the function whose name is the entry type of entry. |
| public class | BstFunctions.
Pushes the string that was the \cite-command argument for this entry. |
| public static interface | |
| public class | BstFunctions.
Pushes the current entry's type (book, article, etc.), but pushes the null string if the type is either unknown or undefined. |
| Modifier and Type | Field and Description |
|---|---|
| private static final Pattern | |
| private final StringBuilder | |
| private int | |
| private final Map | |
| private final Map | |
| private static final Logger | |
| private final String | |
| private final Deque | |
| private final Map |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | bstAdd(BstVMVisitor visitor, ParserRuleContext ctx)
Pops the top two (integer) literals and pushes their sum. |
| private void | bstAddPeriod(BstVMVisitor visitor, ParserRuleContext ctx)
Pops the top (string) literal, adds a `.' to it if the last non '}' character isn't a `.', `?', or `!', and pushes this resulting string. |
| private void | bstChangeCase(BstVMVisitor visitor, ParserRuleContext ctx)
Pops the top two (string) literals; it changes the case of the second according to the specifications of the first, as follows. |
| private void | bstChrToInt(BstVMVisitor visitor, ParserRuleContext ctx)
Pops the top (string) literal, makes sure it's a single character, converts it to the corresponding ASCII integer, and pushes this integer. |
| private void | bstConcat(BstVMVisitor visitor, ParserRuleContext ctx)
Pops the top two (string) literals, concatenates them (in reverse order, that is, the order in which pushed), and pushes the resulting string. |
| private void | bstDuplicate(BstVMVisitor visitor, ParserRuleContext ctx)
Pops the top literal from the stack and pushes two copies of it. |
| private void | bstEmpty(BstVMVisitor visitor, ParserRuleContext ctx)
Pops the top literal and pushes the integer 1 if it's a missing field or a string having no non-white-space characters, 0 otherwise. |
| private void | bstEquals(BstVMVisitor visitor, ParserRuleContext ctx)
Pops the top two (both integer or both string) literals, compares them, and pushes the integer 1 if they're equal, 0 otherwise. |
| private void | bstFormatName(BstVMVisitor visitor, ParserRuleContext ctx)
The |built_in| function {\.{format.name\$}} pops the top three literals (they are a string, an integer, and a string literal, in that order). |
| private void | bstIf(BstVMVisitor visitor, ParserRuleContext ctx)
Pops the top three literals (they are two function literals and an integer literal, in that order); if the integer is greater than 0, it executes the second literal, else it executes the first. |
| private void | bstIntToChr(BstVMVisitor visitor, ParserRuleContext ctx)
Pops the top (integer) literal, interpreted as the ASCII integer value of a single character, converts it to the corresponding single-character string, and pushes this string. |
| private void | bstIntToStr(BstVMVisitor visitor, ParserRuleContext ctx)
Pops the top (integer) literal, converts it to its (unique) string equivalent, and pushes this string. |
| private void | bstIsGreaterThan(BstVMVisitor visitor, ParserRuleContext ctx)
Pops the top two (integer) literals, compares them, and pushes the integer 1 if the second is greater than the first, 0 otherwise. |
| private void | bstIsLowerThan(BstVMVisitor visitor, ParserRuleContext ctx)
Pops the top two (integer) literals, compares them, and pushes the integer 1 if the second is lower than the first, 0 otherwise. |
| private void | bstMissing(BstVMVisitor visitor, ParserRuleContext ctx)
Pops the top literal and pushes the integer 1 if it's a missing field, 0 otherwise. |
| private void | bstNewLine(BstVMVisitor visitor, ParserRuleContext ctx)
Writes onto the bbl file what is accumulated in the output buffer. |
| private void | bstNumNames(BstVMVisitor visitor, ParserRuleContext ctx)
Pops the top (string) literal and pushes the number of names the string represents one plus the number of occurrences of the substring "and" (ignoring case differences) surrounded by non-null white-space at the top brace level. |
| private void | bstPop(BstVMVisitor visitor, ParserRuleContext ctx)
Pops the top of the stack but doesn't print it; this gets rid of an unwanted stack literal. |
| private void | bstPreamble(BstVMVisitor visitor, ParserRuleContext ctx)
The |built_in| function {\.{preamble\$}} pushes onto the stack the concatenation of all the \.{preamble} strings read from the database files. |
| private void | bstPurify(BstVMVisitor visitor, ParserRuleContext ctx)
Pops the top (string) literal, removes nonalphanumeric characters except for white-space characters and hyphens and ties (these all get converted to a space), removes certain alphabetic characters contained in the control sequences associated with a \special character", and pushes the resulting string. |
| private void | bstQuote(BstVMVisitor visitor, ParserRuleContext ctx)
Pushes the string consisting of the double-quote character. |
| private void | |
| private void | bstStack(BstVMVisitor visitor, ParserRuleContext ctx)
Pops and prints the whole stack; it's meant to be used for style designers while debugging. |
| pack-priv void | bstSubstring(BstVMVisitor visitor, ParserRuleContext ctx)
Pops the top three literals (they are the two integers literals len and start, and a string literal, in that order). |
| private void | bstSubtract(BstVMVisitor visitor, ParserRuleContext ctx)
Pops the top two (integer) literals and pushes their difference (the first subtracted from the second). |
| private void | |
| private void | bstTextLength(BstVMVisitor visitor, ParserRuleContext ctx)
text.length$ Pops the top (string) literal, and pushes the number of text characters it contains, where an accented character (more precisely, a "special character", defined in Section 4) counts as a single text character, even if it's missing its matching right brace, and where braces don't count as text characters. |
| private void | bstTextPrefix(BstVMVisitor visitor, ParserRuleContext ctx)
Pops the top two literals (the integer literal len and a string literal, in that order). |
| private void | bstTop(BstVMVisitor visitor, ParserRuleContext ctx)
Pops and prints the top of the stack to the log file. |
| private void | bstWarning(BstVMVisitor visitor, ParserRuleContext ctx)
Pops the top (string) literal and prints it following a warning message. |
| private void | bstWhile(BstVMVisitor visitor, ParserRuleContext ctx)
Pops the top two (function) literals, and keeps executing the second as long as the (integer) literal left on the stack by executing the first is greater than 0. |
| private void | bstWidth(BstVMVisitor visitor, ParserRuleContext ctx)
The |built_in| function {\.{width\$}} pops the top (string) literal and pushes the integer that represents its width in units specified by the |char_width| array. |
| private void | bstWrite(BstVMVisitor visitor, ParserRuleContext ctx)
Pops the top (string) literal and writes it on the output buffer (which will result in stuff being written onto the bbl file when the buffer fills up). |
| private void | |
| protected Map |
| ADD_PERIOD_PATTERN | back to summary |
|---|---|
| private static final Pattern ADD_PERIOD_PATTERN | |
| bbl | back to summary |
|---|---|
| private final StringBuilder bbl | |
| bstWarning | back to summary |
|---|---|
| private int bstWarning | |
| functions | back to summary |
|---|---|
| private final Map<String, BstFunctions. | |
| integers | back to summary |
|---|---|
| private final Map<String, Integer> integers | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| preamble | back to summary |
|---|---|
| private final String preamble | |
| stack | back to summary |
|---|---|
| private final Deque<Object> stack | |
| strings | back to summary |
|---|---|
| private final Map<String, String> strings | |
| BstFunctions | back to summary |
|---|---|
| public BstFunctions(BstVMContext bstVMContext, StringBuilder bbl) | |
| bstAdd | back to summary |
|---|---|
| private void bstAdd(BstVMVisitor visitor, ParserRuleContext ctx) Pops the top two (integer) literals and pushes their sum. | |
| bstAddPeriod | back to summary |
|---|---|
| private void bstAddPeriod(BstVMVisitor visitor, ParserRuleContext ctx) Pops the top (string) literal, adds a `.' to it if the last non '}' character isn't a `.', `?', or `!', and pushes this resulting string. | |
| bstChangeCase | back to summary |
|---|---|
| private void bstChangeCase(BstVMVisitor visitor, ParserRuleContext ctx) Pops the top two (string) literals; it changes the case of the second according to the specifications of the first, as follows. (Note: The word `letters' in the next sentence refers only to those at brace-level 0, the top-most brace level; no other characters are changed, except perhaps for \special characters", described in Section 4.) If the first literal is the string `t', it converts to lower case all letters except the very first character in the string, which it leaves alone, and except the first character following any colon and then nonnull white space, which it also leaves alone; if it's the string `l', it converts all letters to lower case; and if it's the string `u', it converts all letters to upper case. It then pushes this resulting string. If either type is incorrect, it complains and pushes the null string; however, if both types are correct but the specification string (i.e., the first string) isn't one of the legal ones, it merely pushes the second back onto the stack, after complaining. (Another Note It ignores case differences in the specification string; for example, the strings t and T are equivalent for the purposes of this built-in function.) | |
| bstChrToInt | back to summary |
|---|---|
| private void bstChrToInt(BstVMVisitor visitor, ParserRuleContext ctx) Pops the top (string) literal, makes sure it's a single character, converts it to the corresponding ASCII integer, and pushes this integer. | |
| bstConcat | back to summary |
|---|---|
| private void bstConcat(BstVMVisitor visitor, ParserRuleContext ctx) Pops the top two (string) literals, concatenates them (in reverse order, that is, the order in which pushed), and pushes the resulting string. | |
| bstDuplicate | back to summary |
|---|---|
| private void bstDuplicate(BstVMVisitor visitor, ParserRuleContext ctx) Pops the top literal from the stack and pushes two copies of it. | |
| bstEmpty | back to summary |
|---|---|
| private void bstEmpty(BstVMVisitor visitor, ParserRuleContext ctx) Pops the top literal and pushes the integer 1 if it's a missing field or a string having no non-white-space characters, 0 otherwise. | |
| bstEquals | back to summary |
|---|---|
| private void bstEquals(BstVMVisitor visitor, ParserRuleContext ctx) Pops the top two (both integer or both string) literals, compares them, and pushes the integer 1 if they're equal, 0 otherwise. | |
| bstFormatName | back to summary |
|---|---|
| private void bstFormatName(BstVMVisitor visitor, ParserRuleContext ctx) The |built_in| function {\.{format.name\$}} pops the top three literals (they are a string, an integer, and a string literal, in that order). The last string literal represents a name list (each name corresponding to a person), the integer literal specifies which name to pick from this list, and the first string literal specifies how to format this name, as described in the \BibTeX\ documentation. Finally, this function pushes the formatted name. If any of the types is incorrect, it complains and pushes the null string. | |
| bstIf | back to summary |
|---|---|
| private void bstIf(BstVMVisitor visitor, ParserRuleContext ctx) Pops the top three literals (they are two function literals and an integer literal, in that order); if the integer is greater than 0, it executes the second literal, else it executes the first. | |
| bstIntToChr | back to summary |
|---|---|
| private void bstIntToChr(BstVMVisitor visitor, ParserRuleContext ctx) Pops the top (integer) literal, interpreted as the ASCII integer value of a single character, converts it to the corresponding single-character string, and pushes this string. | |
| bstIntToStr | back to summary |
|---|---|
| private void bstIntToStr(BstVMVisitor visitor, ParserRuleContext ctx) Pops the top (integer) literal, converts it to its (unique) string equivalent, and pushes this string. | |
| bstIsGreaterThan | back to summary |
|---|---|
| private void bstIsGreaterThan(BstVMVisitor visitor, ParserRuleContext ctx) Pops the top two (integer) literals, compares them, and pushes the integer 1 if the second is greater than the first, 0 otherwise. | |
| bstIsLowerThan | back to summary |
|---|---|
| private void bstIsLowerThan(BstVMVisitor visitor, ParserRuleContext ctx) Pops the top two (integer) literals, compares them, and pushes the integer 1 if the second is lower than the first, 0 otherwise. | |
| bstMissing | back to summary |
|---|---|
| private void bstMissing(BstVMVisitor visitor, ParserRuleContext ctx) Pops the top literal and pushes the integer 1 if it's a missing field, 0 otherwise. | |
| bstNewLine | back to summary |
|---|---|
| private void bstNewLine(BstVMVisitor visitor, ParserRuleContext ctx) Writes onto the bbl file what is accumulated in the output buffer. It writes a blank line if and only if the output buffer is empty. Since write$ does reasonable line breaking, you should use this function only when you want a blank line or an explicit line break. | |
| bstNumNames | back to summary |
|---|---|
| private void bstNumNames(BstVMVisitor visitor, ParserRuleContext ctx) Pops the top (string) literal and pushes the number of names the string represents one plus the number of occurrences of the substring "and" (ignoring case differences) surrounded by non-null white-space at the top brace level. | |
| bstPop | back to summary |
|---|---|
| private void bstPop(BstVMVisitor visitor, ParserRuleContext ctx) Pops the top of the stack but doesn't print it; this gets rid of an unwanted stack literal. | |
| bstPreamble | back to summary |
|---|---|
| private void bstPreamble(BstVMVisitor visitor, ParserRuleContext ctx) The |built_in| function {\.{preamble\$}} pushes onto the stack the concatenation of all the \.{preamble} strings read from the database files. (or the empty string if there were none) '@PREAMBLE' strings are read from the database files. | |
| bstPurify | back to summary |
|---|---|
| private void bstPurify(BstVMVisitor visitor, ParserRuleContext ctx) Pops the top (string) literal, removes nonalphanumeric characters except for white-space characters and hyphens and ties (these all get converted to a space), removes certain alphabetic characters contained in the control sequences associated with a \special character", and pushes the resulting string. | |
| bstQuote | back to summary |
|---|---|
| private void bstQuote(BstVMVisitor visitor, ParserRuleContext ctx) Pushes the string consisting of the double-quote character. | |
| bstSkip | back to summary |
|---|---|
| private void bstSkip(BstVMVisitor visitor, ParserRuleContext ctx) Does nothing. | |
| bstStack | back to summary |
|---|---|
| private void bstStack(BstVMVisitor visitor, ParserRuleContext ctx) Pops and prints the whole stack; it's meant to be used for style designers while debugging. | |
| bstSubstring | back to summary |
|---|---|
| pack-priv void bstSubstring(BstVMVisitor visitor, ParserRuleContext ctx) Pops the top three literals (they are the two integers literals len and start, and a string literal, in that order). It pushes the substring of the (at most) len consecutive characters starting at the start-th character (assuming 1-based indexing) if start is positive, and ending at the start-th character (including) from the end if start is negative (where the first character from the end is the last character).
| |
| bstSubtract | back to summary |
|---|---|
| private void bstSubtract(BstVMVisitor visitor, ParserRuleContext ctx) Pops the top two (integer) literals and pushes their difference (the first subtracted from the second). | |
| bstSwap | back to summary |
|---|---|
| private void bstSwap(BstVMVisitor visitor, ParserRuleContext ctx) Swaps the top two literals on the stack. text.length$ Pops the top (string) literal, and pushes the number of text characters it contains, where an accented character (more precisely, a \special character", defined in Section 4) counts as a single text character, even if it's missing its matching right brace, and where braces don't count as text characters. | |
| bstTextLength | back to summary |
|---|---|
| private void bstTextLength(BstVMVisitor visitor, ParserRuleContext ctx) text.length$ Pops the top (string) literal, and pushes the number of text characters it contains, where an accented character (more precisely, a "special character", defined in Section 4) counts as a single text character, even if it's missing its matching right brace, and where braces don't count as text characters. From BibTeXing: For the purposes of counting letters in labels, BibTEX considers everything contained inside the braces as a single letter. | |
| bstTextPrefix | back to summary |
|---|---|
| private void bstTextPrefix(BstVMVisitor visitor, ParserRuleContext ctx) Pops the top two literals (the integer literal len and a string literal, in that order). It pushes the substring of the (at most) len consecutive text characters starting from the beginning of the string. This function is similar to substring$, but this one considers a \special character", even if it's missing its matching right brace, to be a single text character (rather than however many ASCII characters it actually comprises), and this function doesn't consider braces to be text characters; furthermore, this function appends any needed matching right braces. | |
| bstTop | back to summary |
|---|---|
| private void bstTop(BstVMVisitor visitor, ParserRuleContext ctx) Pops and prints the top of the stack to the log file. It's useful for debugging. | |
| bstWarning | back to summary |
|---|---|
| private void bstWarning(BstVMVisitor visitor, ParserRuleContext ctx) Pops the top (string) literal and prints it following a warning message. This also increments a count of the number of warning messages issued. | |
| bstWhile | back to summary |
|---|---|
| private void bstWhile(BstVMVisitor visitor, ParserRuleContext ctx) Pops the top two (function) literals, and keeps executing the second as long as the (integer) literal left on the stack by executing the first is greater than 0. | |
| bstWidth | back to summary |
|---|---|
| private void bstWidth(BstVMVisitor visitor, ParserRuleContext ctx) The |built_in| function {\.{width\$}} pops the top (string) literal and pushes the integer that represents its width in units specified by the |char_width| array. This function takes the literal literally; that is, it assumes each character in the string is to be printed as is, regardless of whether the character has a special meaning to \TeX, except that special characters (even without their |right_brace|s) are handled specially. If the literal isn't a string, it complains and pushes~0. | |
| bstWrite | back to summary |
|---|---|
| private void bstWrite(BstVMVisitor visitor, ParserRuleContext ctx) Pops the top (string) literal and writes it on the output buffer (which will result in stuff being written onto the bbl file when the buffer fills up). | |
| callIdentifierOrTree | back to summary |
|---|---|
| private void callIdentifierOrTree(Object f, BstVMVisitor visitor, ParserRuleContext ctx) | |
| getBuiltInFunctions | back to summary |
|---|---|
| protected Map | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | execute(BstVMVisitor visitor, ParserRuleContext ctx)
Implements org.
|
| public void | execute(BstVMVisitor visitor, ParserRuleContext ctx, BstEntry bstEntry)
Overrides default org.
|
| BstAssignFunction | back to summary |
|---|---|
| public BstAssignFunction() | |
| execute | back to summary |
|---|---|
| public void execute(BstVMVisitor visitor, ParserRuleContext ctx) Implements org.
| |
| execute | back to summary |
|---|---|
| public void execute(BstVMVisitor visitor, ParserRuleContext ctx, BstEntry bstEntry) Overrides default org.
| |
default.type function.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | execute(BstVMVisitor visitor, ParserRuleContext ctx)
Implements org.
|
| public void | execute(BstVMVisitor visitor, ParserRuleContext ctx, BstEntry bstEntry)
Overrides default org.
|
| BstCallTypeFunction | back to summary |
|---|---|
| public BstCallTypeFunction() | |
| execute | back to summary |
|---|---|
| public void execute(BstVMVisitor visitor, ParserRuleContext ctx) Implements org.
| |
| execute | back to summary |
|---|---|
| public void execute(BstVMVisitor visitor, ParserRuleContext ctx, BstEntry bstEntry) Overrides default org.
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | execute(BstVMVisitor visitor, ParserRuleContext ctx)
Implements org.
|
| public void | execute(BstVMVisitor visitor, ParserRuleContext ctx, BstEntry bstEntryContext)
Overrides default org.
|
| BstCiteFunction | back to summary |
|---|---|
| public BstCiteFunction() | |
| execute | back to summary |
|---|---|
| public void execute(BstVMVisitor visitor, ParserRuleContext ctx) Implements org.
| |
| execute | back to summary |
|---|---|
| public void execute(BstVMVisitor visitor, ParserRuleContext ctx, BstEntry bstEntryContext) Overrides default org.
| |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public default void |
| execute | back to summary |
|---|---|
| public void execute(BstVMVisitor visitor, ParserRuleContext ctx) | |
| execute | back to summary |
|---|---|
| public default void execute(BstVMVisitor visitor, ParserRuleContext ctx, BstEntry bstEntryContext) | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | execute(BstVMVisitor visitor, ParserRuleContext ctx)
Implements org.
|
| public void | execute(BstVMVisitor visitor, ParserRuleContext ctx, BstEntry bstEntryContext)
Overrides default org.
|
| BstTypeFunction | back to summary |
|---|---|
| public BstTypeFunction() | |
| execute | back to summary |
|---|---|
| public void execute(BstVMVisitor visitor, ParserRuleContext ctx) Implements org.
| |
| execute | back to summary |
|---|---|
| public void execute(BstVMVisitor visitor, ParserRuleContext ctx, BstEntry bstEntryContext) Overrides default org.
| |