Skip to content

Commit e453816

Browse files
authored
Fix for 3847 -- fix build. (#3849)
* Fix for 3847 -- fix build. The following targets fail the build: * asm/ptx/ptx-isa-1.0 with Cpp: NAN is a symbol conflict for Cpp--apparently now for MacOS. ./icon ./lark .sieve ./smtlibv2 ./wavefront with Go target--symbol conflict apparently now with "start" as a parser rule. * ./scala with Go target--timeout. This grammar is super slow. Go target should be removed from desc.xml to indicate it doesn't work. * elixir with PHP target--stack overflow. The PHP has logical errors in the code. I tried to address some of the problems, but it was too much, and needed to work on other things. Fix for #12 -- Allowed memory size of 134217728 bytes exhausted. antlr-php-runtime#34 * Fix problem with "options=" parse errors in tool Workaround the issue in tool antlr/antlr4#4474 by renaming the rule element label.
1 parent 35e683d commit e453816

File tree

11 files changed

+12
-12
lines changed

11 files changed

+12
-12
lines changed

apt/apt.g4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
grammar apt;
44

55
// productions
6-
record: commented=commenterR? rType=TypeR WSS options=optionsR? uri=uriR WSS distribution=wordWithDash components=componentsR WSS? EOF;
6+
record: commented=commenterR? rType=TypeR WSS options_ = optionsR? uri=uriR WSS distribution=wordWithDash components=componentsR WSS? EOF;
77
wordWithDashSegment: Word | Dash;
88
wordWithDash: wordWithDashSegment+;
99
component: WSS cId=wordWithDash;

asm/ptx/ptx-isa-1.0/PTXLexer.g4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ LEU : '.leu';
188188
GTU : '.gtu';
189189
GEU : '.geu';
190190
NUM : '.num';
191-
NAN : '.nan';
191+
NAN_ : '.nan';
192192
HI : '.hi';
193193
LO : '.lo';
194194
WIDE : '.wide';

asm/ptx/ptx-isa-1.0/PTXParser.g4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ cmp_op
298298
| GTU
299299
| GEU
300300
| NUM
301-
| NAN
301+
| NAN_
302302
;
303303

304304
bool_op

elixir/desc.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<desc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../_scripts/desc.xsd">
3-
<!-- Although they work, the Go and Python targets are excluded since they are very slow -->
4-
<targets>CSharp;Dart;Java;JavaScript;PHP;TypeScript</targets>
3+
<!-- Although they work, the Go, PHP, and Python targets are excluded since they are very slow -->
4+
<targets>CSharp;Dart;Java;JavaScript;TypeScript</targets>
55
</desc>

icon/icon.g4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3232

3333
grammar icon;
3434

35-
start
35+
start_
3636
: prog EOF
3737
;
3838

lark/LarkParser.g4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ options {
44
tokenVocab = LarkLexer;
55
}
66

7-
start: item* EOF;
7+
start_: item* EOF;
88

99
item: rule_ | token | statement ;
1010

scala/desc.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<desc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../_scripts/desc.xsd">
3-
<targets>CSharp;Cpp;Dart;Go;Java;JavaScript;TypeScript;Python3</targets>
3+
<targets>CSharp;Cpp;Dart;Java;JavaScript;TypeScript;Python3</targets>
44
<entry-point>compilationUnit</entry-point>
55
</desc>

sieve/sieve.g4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3535
*/
3636
grammar sieve;
3737

38-
start
38+
start_
3939
: commands EOF
4040
;
4141

smtlibv2/SMTLIBv2.g4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ UndefinedSymbol:
485485

486486
// Starting rule(s)
487487

488-
start
488+
start_
489489
: logic EOF
490490
| theory_decl EOF
491491
| script EOF

sql/tsql/TSqlParser.g4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3955,7 +3955,7 @@ group_by_item
39553955

39563956
option_clause
39573957
// https://msdn.microsoft.com/en-us/library/ms181714.aspx
3958-
: OPTION '(' options+=option (',' options+=option)* ')'
3958+
: OPTION '(' options_ += option (',' options_ += option)* ')'
39593959
;
39603960

39613961
option

0 commit comments

Comments
 (0)