cariboujs 2.0.5 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +6 -2
  2. package/c/CLexer.js +332 -333
  3. package/c/CParser.js +4 -4
  4. package/c/CParserBase.js +27 -1
  5. package/c/SymbolTable.js +6 -1
  6. package/cpp/CPP14Parser.js +415 -404
  7. package/csharp/v8-spec/CSharpParser.js +3943 -3932
  8. package/csharp/v8-spec/CSharpParserBase.js +19 -1
  9. package/cypher/CypherParser.js +1171 -780
  10. package/cypher/CypherParserListener.js +27 -0
  11. package/cypher/CypherParserVisitor.js +18 -0
  12. package/gql/GQLLexer.js +2203 -0
  13. package/gql/GQLListener.js +5499 -0
  14. package/gql/GQLParser.js +58653 -0
  15. package/gql/GQLVisitor.js +3670 -0
  16. package/maml/MAMLLexer.js +116 -0
  17. package/maml/MAMLListener.js +72 -0
  18. package/maml/MAMLParser.js +935 -0
  19. package/maml/MAMLVisitor.js +52 -0
  20. package/odin/odinLexer.js +739 -0
  21. package/odin/odinListener.js +882 -0
  22. package/odin/odinParser.js +12189 -0
  23. package/odin/odinVisitor.js +592 -0
  24. package/package.json +1 -1
  25. package/sql/mysql/Oracle/MySQLLexer.js +3689 -3668
  26. package/sql/mysql/Oracle/MySQLParser.js +4383 -4399
  27. package/sql/plsql/PlSqlLexer.js +13604 -13587
  28. package/sql/plsql/PlSqlParser.js +43390 -40158
  29. package/sql/plsql/PlSqlParserListener.js +36 -0
  30. package/sql/plsql/PlSqlParserVisitor.js +24 -0
  31. package/sql/postgresql/PostgreSQLParser.js +91 -91
  32. package/sql/snowflake/SnowflakeParser.js +1556 -1536
  33. package/sql/sqlite/SQLiteParser.js +2074 -1737
  34. package/turtle/TURTLELexer.js +155 -156
  35. package/vba/vba7_1/vbaLexer.js +1689 -0
  36. package/vba/vba7_1/vbaParser.js +42797 -0
  37. package/vba/vba7_1/vbaParserListener.js +3267 -0
  38. package/vba/vba7_1/vbaParserVisitor.js +2182 -0
  39. package/vhdl/vhdl2008/vhdl2008Listener.js +9 -0
  40. package/vhdl/vhdl2008/vhdl2008Parser.js +2840 -2705
  41. package/vhdl/vhdl2008/vhdl2008Visitor.js +6 -0
  42. package/wkt/wktLexer.js +177 -148
  43. package/wkt/wktListener.js +123 -60
  44. package/wkt/wktParser.js +1802 -1125
  45. package/wkt/wktVisitor.js +72 -30
  46. /package/scala/{ScalaLexer.js → scala2/ScalaLexer.js} +0 -0
  47. /package/scala/{ScalaListener.js → scala2/ScalaListener.js} +0 -0
  48. /package/scala/{ScalaParser.js → scala2/ScalaParser.js} +0 -0
  49. /package/scala/{ScalaVisitor.js → scala2/ScalaVisitor.js} +0 -0
package/c/CParser.js CHANGED
@@ -600,7 +600,7 @@ export default class CParser extends CParserBase {
600
600
  "Const", "Constexpr", "Continue", "Default",
601
601
  "Deprecated", "Do", "Double", "Else", "Enum",
602
602
  "Extern", "False_", "Float", "For", "Goto",
603
- "If", "Inline", "Int", "Label", "Long", "Nulptr",
603
+ "If", "Inline", "Int", "Label", "Long", "Nullptr_",
604
604
  "Register", "Restrict", "Return", "Short",
605
605
  "Signed", "Sizeof", "Static", "Static_assert",
606
606
  "Struct", "Switch", "True_", "Typedef", "Typeof",
@@ -7034,7 +7034,7 @@ CParser.Inline = 52;
7034
7034
  CParser.Int = 53;
7035
7035
  CParser.Label = 54;
7036
7036
  CParser.Long = 55;
7037
- CParser.Nulptr = 56;
7037
+ CParser.Nullptr_ = 56;
7038
7038
  CParser.Register = 57;
7039
7039
  CParser.Restrict = 58;
7040
7040
  CParser.Return = 59;
@@ -7411,8 +7411,8 @@ class PredefinedConstantContext extends antlr4.ParserRuleContext {
7411
7411
  return this.getToken(CParser.True_, 0);
7412
7412
  };
7413
7413
 
7414
- Nulptr() {
7415
- return this.getToken(CParser.Nulptr, 0);
7414
+ Nullptr_() {
7415
+ return this.getToken(CParser.Nullptr_, 0);
7416
7416
  };
7417
7417
 
7418
7418
  enterRule(listener) {
package/c/CParserBase.js CHANGED
@@ -130,6 +130,20 @@ export default class CParserBase extends antlr4.Parser {
130
130
  const lt1 = this._input.LT(1);
131
131
  const text = lt1.text;
132
132
  if (this._debug) console.log("IsDeclarationSpecifier " + lt1);
133
+ if (lt1.type === CLexer.Identifier && this._ctx instanceof CParser.DeclarationSpecifiersContext) {
134
+ const dsCtx = this._ctx;
135
+ const resolvedId = this._resolveWithOutput(lt1);
136
+ if (resolvedId !== null && !resolvedId.predefined
137
+ && !resolvedId.classification.has(TypeClassification.Variable_)
138
+ && !resolvedId.classification.has(TypeClassification.Function_)) {
139
+ const specList = dsCtx.declarationSpecifier() ?? null;
140
+ if (specList) {
141
+ for (const spec of specList) {
142
+ if (spec.typeSpecifier() != null) return false;
143
+ }
144
+ }
145
+ }
146
+ }
133
147
  const result = this.IsStorageClassSpecifier()
134
148
  || this.IsTypeSpecifier()
135
149
  || this.IsTypeQualifier()
@@ -531,7 +545,19 @@ export default class CParserBase extends antlr4.Parser {
531
545
  if (resolved === null) {
532
546
  result = true;
533
547
  } else if (resolved.classification.has(TypeClassification.TypeQualifier_) || resolved.classification.has(TypeClassification.TypeSpecifier_)) {
534
- result = false;
548
+ if (lt1.type === CLexer.Identifier && resolved.classification.has(TypeClassification.TypeSpecifier_)) {
549
+ if (this._ctx instanceof CParser.DeclarationContext) {
550
+ const declCtx = this._ctx;
551
+ const dsCtx = declCtx.declarationSpecifiers();
552
+ const specList = dsCtx?.declarationSpecifier() ?? null;
553
+ if (specList) {
554
+ for (const spec of specList) {
555
+ if (spec.typeSpecifier() != null) { result = true; break; }
556
+ }
557
+ }
558
+ }
559
+ }
560
+ if (!result) result = false;
535
561
  } else {
536
562
  result = true;
537
563
  }
package/c/SymbolTable.js CHANGED
@@ -35,7 +35,8 @@ export class SymbolTable {
35
35
  this.define(this._createSymbol("long", TypeClassification.TypeSpecifier_));
36
36
  this.define(this._createSymbol("float", TypeClassification.TypeSpecifier_));
37
37
  this.define(this._createSymbol("double", TypeClassification.TypeSpecifier_));
38
- this.define(this._createSymbol("signed", TypeClassification.TypeSpecifier_));
38
+ this.define(this._createSymbol("signed", TypeClassification.TypeSpecifier_));
39
+ this.define(this._createSymbol("__signed__", TypeClassification.TypeSpecifier_));
39
40
  this.define(this._createSymbol("unsigned", TypeClassification.TypeSpecifier_));
40
41
  this.define(this._createSymbol("_BitInt", TypeClassification.TypeSpecifier_));
41
42
  this.define(this._createSymbol("bool", TypeClassification.TypeSpecifier_));
@@ -100,6 +101,10 @@ export class SymbolTable {
100
101
  this.define(this._createSymbol("_Float32", TypeClassification.TypeSpecifier_));
101
102
  this.define(this._createSymbol("_Float64", TypeClassification.TypeSpecifier_));
102
103
  this.define(this._createSymbol("_Float128", TypeClassification.TypeSpecifier_));
104
+ this.define(this._createSymbol("_Float16x", TypeClassification.TypeSpecifier_));
105
+ this.define(this._createSymbol("_Float32x", TypeClassification.TypeSpecifier_));
106
+ this.define(this._createSymbol("_Float64x", TypeClassification.TypeSpecifier_));
107
+ this.define(this._createSymbol("_Float128x", TypeClassification.TypeSpecifier_));
103
108
  this.define(this._createSymbol("__v8hf", TypeClassification.TypeSpecifier_));
104
109
  this.define(this._createSymbol("__bf16", TypeClassification.TypeSpecifier_));
105
110
  this.define(this._createSymbol("__v16bf", TypeClassification.TypeSpecifier_));