Skip to content

Commit

Permalink
Fix for 3847 -- fix build. (#3849)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
kaby76 authored Nov 27, 2023
1 parent 35e683d commit e453816
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion apt/apt.g4
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
grammar apt;

// productions
record: commented=commenterR? rType=TypeR WSS options=optionsR? uri=uriR WSS distribution=wordWithDash components=componentsR WSS? EOF;
record: commented=commenterR? rType=TypeR WSS options_ = optionsR? uri=uriR WSS distribution=wordWithDash components=componentsR WSS? EOF;
wordWithDashSegment: Word | Dash;
wordWithDash: wordWithDashSegment+;
component: WSS cId=wordWithDash;
Expand Down
2 changes: 1 addition & 1 deletion asm/ptx/ptx-isa-1.0/PTXLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ LEU : '.leu';
GTU : '.gtu';
GEU : '.geu';
NUM : '.num';
NAN : '.nan';
NAN_ : '.nan';
HI : '.hi';
LO : '.lo';
WIDE : '.wide';
Expand Down
2 changes: 1 addition & 1 deletion asm/ptx/ptx-isa-1.0/PTXParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ cmp_op
| GTU
| GEU
| NUM
| NAN
| NAN_
;

bool_op
Expand Down
4 changes: 2 additions & 2 deletions elixir/desc.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<desc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../_scripts/desc.xsd">
<!-- Although they work, the Go and Python targets are excluded since they are very slow -->
<targets>CSharp;Dart;Java;JavaScript;PHP;TypeScript</targets>
<!-- Although they work, the Go, PHP, and Python targets are excluded since they are very slow -->
<targets>CSharp;Dart;Java;JavaScript;TypeScript</targets>
</desc>
2 changes: 1 addition & 1 deletion icon/icon.g4
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

grammar icon;

start
start_
: prog EOF
;

Expand Down
2 changes: 1 addition & 1 deletion lark/LarkParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ options {
tokenVocab = LarkLexer;
}

start: item* EOF;
start_: item* EOF;

item: rule_ | token | statement ;

Expand Down
2 changes: 1 addition & 1 deletion scala/desc.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<desc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../_scripts/desc.xsd">
<targets>CSharp;Cpp;Dart;Go;Java;JavaScript;TypeScript;Python3</targets>
<targets>CSharp;Cpp;Dart;Java;JavaScript;TypeScript;Python3</targets>
<entry-point>compilationUnit</entry-point>
</desc>
2 changes: 1 addition & 1 deletion sieve/sieve.g4
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
grammar sieve;

start
start_
: commands EOF
;

Expand Down
2 changes: 1 addition & 1 deletion smtlibv2/SMTLIBv2.g4
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ UndefinedSymbol:

// Starting rule(s)

start
start_
: logic EOF
| theory_decl EOF
| script EOF
Expand Down
2 changes: 1 addition & 1 deletion sql/tsql/TSqlParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -3955,7 +3955,7 @@ group_by_item

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

option
Expand Down
2 changes: 1 addition & 1 deletion wavefront/WavefrontOBJ.g4
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ grammar WavefrontOBJ;

// PARSER RULES

start
start_
: NL* (statement (NL+ | EOF))+
;

Expand Down

5 comments on commit e453816

@mike-lischke
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kaby76 Why did you commit this patch? We discussed it in my patch that I cherry picked it to avoid merge conflicts. Now exactly that happens and I have to rebase and start the entire build process again. That was not wise...

@kaby76
Copy link
Contributor Author

@kaby76 kaby76 commented on e453816 Nov 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left the PR as "ready" when I should have been marked "draft". Then, after you merged the changes, I would "cancel" my PR. It did cross my mind that there might be a screw up, and that's what happened. @teverett merged it into "master". I don't think you have to deal with the conflict. @teverett should just select everything in your PR over my PR when using the "merge PR" for the repo in the Github UI. If it can't be done in the website UI, just merge and resolve conflicts using Github Desktop. I don't think you need to rebase; your code is fine.

@teverett
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My mistake :)

@kaby76
Copy link
Contributor Author

@kaby76 kaby76 commented on e453816 Nov 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not a big problem. I just wouldn't do any merges until this huge PR is merged first.

@mike-lischke
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, no worries. Let's see if that works now...

Please sign in to comment.