Lines Matching defs:version

8  * This class provides access to the current version of the ANTLR 4 runtime
10 * checking for matching version numbers and notifying listeners in the case
11 * where a version mismatch is detected.
13 * The runtime version information is provided by {@see RuntimeMetaData::VERSION} and
17 * The runtime version check is implemented by {@see RuntimeMetaData::checkVersion()}. Detailed
22 * would be generated. Likewise, version strings x.y-SNAPSHOT and x.y.z are
31 * A compile-time constant containing the current version of the ANTLR 4
35 * libraries to include a literal reference to the version of the ANTLR 4
57 * Gets the currently executing version of the ANTLR 4 runtime library.
63 * @return string The currently executing version of the ANTLR 4 library
71 * This method provides the ability to detect mismatches between the version
72 * of ANTLR 4 used to generate a parser, the version of the ANTLR runtime a
73 * parser was compiled against, and the version of the ANTLR runtime which
76 * The version check is designed to detect the following two specific
79 * The ANTLR Tool version used for code generation does not match the
80 * currently executing runtime version.
81 * The ANTLR Runtime version referenced at the time a parser was
82 * compiled does not match the currently executing runtime version.
86 * constant indicating the version of the tool used to generate the parser
94 * version match and emits an error to stderr if a difference
99 * cases, the underlying version mismatch will not be reported here.
107 * *Additional note for target developers:* The version check
114 * @param string $generatingToolVersion The version of the tool used to
119 * @param string $compileTimeVersion The version of the runtime the parser
135 'ANTLR Tool version %s used for code generation does not ' .
136 'match the current runtime version %s',
147 'ANTLR Runtime version %s used for parser compilation does not ' .
148 'match the current runtime version %s',
158 * Gets the major and minor version numbers from a version string. For
159 * details about the syntax of the input `version`.
162 * @param string $version The complete version string.
165 * only the major and minor components of the version string.
167 public static function getMajorMinorVersion(string $version) : string
169 $firstDot = \strpos($version, '.');
170 $referenceLength = \strlen($version);
174 $secondDot = \strpos($version, '.', $firstDot + 1);
177 $firstDash = \strpos($version, '-');
187 return \substr($version, 0, $referenceLength);