Hi, i tried to run the expo example by lunching the Makefile, but i got the following errors in output:
mkdir -p ../../bin && clang ../../src/citron.c -o ../../bin/citron
../../bin/citron ArithmeticExpressionParser.y -o ArithmeticExpressionParser.swift
swiftc ../../src/CitronParser.swift ../../src/CitronLexer.swift ArithmeticExpressionParser.swift main.swift -o expr
../../src/CitronParser.swift:56:54: error: 'where' clause cannot be attached to an associated type declaration
associatedtype CitronTokenCode: RawRepresentable where CitronTokenCode.RawValue == CitronSymbolCode
^
../../src/CitronParser.swift:399:14: error: expected '(' for subscript parameters
subscript<I: BinaryInteger>(safe i: I) -> Element? {
^
../../src/CitronParser.swift:399:14: error: expected declaration
subscript<I: BinaryInteger>(safe i: I) -> Element? {
^
../../src/CitronParser.swift:398:9: note: in extension of 'Array'
private extension Array {
^
../../src/CitronParser.swift:50:38: error: use of undeclared type 'BinaryInteger'
associatedtype CitronSymbolCode: BinaryInteger // YYCODETYPE in lemon
^~~~~~~~~~~~~
../../src/CitronParser.swift:51:39: error: use of undeclared type 'BinaryInteger'
associatedtype CitronStateNumber: BinaryInteger
^~~~~~~~~~~~~
../../src/CitronParser.swift:52:38: error: use of undeclared type 'BinaryInteger'
associatedtype CitronRuleNumber: BinaryInteger
^~~~~~~~~~~~~
../../src/CitronParser.swift:139:40: error: use of undeclared type 'BinaryInteger'
enum _CitronParsingAction<StateNumber: BinaryInteger, RuleNumber: BinaryInteger> {
^~~~~~~~~~~~~
../../src/CitronParser.swift:139:67: error: use of undeclared type 'BinaryInteger'
enum _CitronParsingAction<StateNumber: BinaryInteger, RuleNumber: BinaryInteger> {
^~~~~~~~~~~~~
../../src/CitronParser.swift:149:38: error: use of undeclared type 'BinaryInteger'
enum _CitronStateOrRule<StateNumber: BinaryInteger, RuleNumber: BinaryInteger> {
^~~~~~~~~~~~~
../../src/CitronParser.swift:149:65: error: use of undeclared type 'BinaryInteger'
enum _CitronStateOrRule<StateNumber: BinaryInteger, RuleNumber: BinaryInteger> {
^~~~~~~~~~~~~
../../src/CitronParser.swift:159:30: error: cannot invoke 'symbolNameFor' with an argument list of type '(code: Self.CitronTokenCode.RawValue)'
tracePrint("Input:", symbolNameFor(code:symbolCode))
^
../../src/CitronParser.swift:159:30: note: expected an argument list of type '(code: Self.CitronSymbolCode)'
tracePrint("Input:", symbolNameFor(code:symbolCode))
^
../../src/CitronParser.swift:161:26: error: cannot invoke 'yyFindShiftAction' with an argument list of type '(lookAhead: Self.CitronTokenCode.RawValue)'
let action = yyFindShiftAction(lookAhead: symbolCode)
^
../../src/CitronParser.swift:161:26: note: expected an argument list of type '(lookAhead: Self.CitronSymbolCode)'
let action = yyFindShiftAction(lookAhead: symbolCode)
^
../../src/CitronParser.swift:185:26: error: cannot invoke 'yyFindShiftAction' with an argument list of type '(lookAhead: Int)'
let action = yyFindShiftAction(lookAhead: 0)
^
../../src/CitronParser.swift:185:26: note: expected an argument list of type '(lookAhead: Self.CitronSymbolCode)'
let action = yyFindShiftAction(lookAhead: 0)
^
../../src/CitronParser.swift:250:20: error: cannot invoke initializer for type 'Int' with an argument list of type '(Self.CitronStateNumber)'
assert(Int(state) < yyShiftOffset.count)
^
../../src/CitronParser.swift:250:20: note: overloads for 'Int' exist with these partially matching parameter lists: (Int64), (Word), (UInt8), (Int8), (UInt16), (Int16), (UInt32), (Int32), (UInt64), (UInt), (Int), (Float), (Double), (Float80), (String, radix: Int), (CGFloat), (NSNumber)
assert(Int(state) < yyShiftOffset.count)
^
../../src/CitronParser.swift:251:30: error: binary operator '<' cannot be applied to operands of type 'Self.CitronSymbolCode' and 'Int'
assert(lookAhead < yyNumberOfSymbols)
~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~
../../src/CitronParser.swift:251:30: note: expected an argument list of type '(Int, Int)'
assert(lookAhead < yyNumberOfSymbols)
^
../../src/CitronParser.swift:252:31: error: cannot invoke initializer for type 'Int' with an argument list of type '(Self.CitronStateNumber)'
i = yyShiftOffset[Int(state)] + Int(lookAhead)
^
../../src/CitronParser.swift:252:31: note: overloads for 'Int' exist with these partially matching parameter lists: (Int64), (Word), (UInt8), (Int8), (UInt16), (Int16), (UInt32), (Int32), (UInt64), (UInt), (Int), (Float), (Double), (Float80), (String, radix: Int), (CGFloat), (NSNumber)
i = yyShiftOffset[Int(state)] + Int(lookAhead)
^
../../src/CitronParser.swift:254:74: error: binary operator '!=' cannot be applied to two 'Self.CitronSymbolCode' operands
if (i < 0 || i >= yyLookaheadAction.count || actionLookahead != lookAhead) {
~~~~~~~~~~~~~~~ ^ ~~~~~~~~~
../../src/CitronParser.swift:254:74: note: overloads for '!=' exist with these partially matching parameter lists: (Any.Type?, Any.Type?), (UInt8, UInt8), (Int8, Int8), (UInt16, UInt16), (Int16, Int16), (UInt32, UInt32), (Int32, Int32), (UInt64, UInt64), (Int64, Int64), (UInt, UInt), (Int, Int), (ContiguousArray, ContiguousArray), (ArraySlice, ArraySlice), (Array, Array), (T?, T?), (T?, _OptionalNilComparisonType), (_OptionalNilComparisonType, T?), ((A, B), (A, B)), ((A, B, C), (A, B, C)), ((A, B, C, D), (A, B, C, D)), ((A, B, C, D, E), (A, B, C, D, E)), ((A, B, C, D, E, F), (A, B, C, D, E, F)), (LazyFilterIndex, LazyFilterIndex), ([Key : Value], [Key : Value])
if (i < 0 || i >= yyLookaheadAction.count || actionLookahead != lookAhead) {
^
../../src/CitronParser.swift:256:45: error: cannot subscript a value of type '[Self.CitronSymbolCode]' with an index of type '(safe: Self.CitronSymbolCode)'
if let fallback = yyFallback[safe: lookAhead], fallback > 0 {
^
../../src/CitronParser.swift:256:45: note: overloads for 'subscript' exist with these partially matching parameter lists: (Int), (Range), (Range<Self.Index>), (ClosedRange<Self.Index>), (CountableRange<Self.Index>), (CountableClosedRange<Self.Index>)
if let fallback = yyFallback[safe: lookAhead], fallback > 0 {
^
../../src/CitronParser.swift:265:33: error: cannot invoke initializer for type 'Int' with an argument list of type '(Self.CitronSymbolCode)'
let j = i - Int(lookAhead) + Int(wildcard)
^
../../src/CitronParser.swift:265:33: note: overloads for 'Int' exist with these partially matching parameter lists: (Int64), (Word), (UInt8), (Int8), (UInt16), (Int16), (UInt32), (Int32), (UInt64), (UInt), (Int), (Float), (Double), (Float80), (String, radix: Int), (CGFloat), (NSNumber)
let j = i - Int(lookAhead) + Int(wildcard)
^
../../src/CitronParser.swift:275:40: error: cannot invoke initializer for type 'Int' with an argument list of type '(Self.CitronStateNumber)'
return yyDefaultAction[Int(state)]
^
../../src/CitronParser.swift:275:40: note: overloads for 'Int' exist with these partially matching parameter lists: (Int64), (Word), (UInt8), (Int8), (UInt16), (Int16), (UInt32), (Int32), (UInt64), (UInt), (Int), (Float), (Double), (Float80), (String, radix: Int), (CGFloat), (NSNumber)
return yyDefaultAction[Int(state)]
^
../../src/CitronParser.swift:284:16: error: cannot invoke initializer for type 'Int' with an argument list of type '(Self.CitronStateNumber)'
assert(Int(state) < yyReduceOffset.count)
^
../../src/CitronParser.swift:284:16: note: overloads for 'Int' exist with these partially matching parameter lists: (Int64), (Word), (UInt8), (Int8), (UInt16), (Int16), (UInt32), (Int32), (UInt64), (UInt), (Int), (Float), (Double), (Float80), (String, radix: Int), (CGFloat), (NSNumber)
assert(Int(state) < yyReduceOffset.count)
^
../../src/CitronParser.swift:285:32: error: cannot invoke initializer for type 'Int' with an argument list of type '(Self.CitronStateNumber)'
var i = yyReduceOffset[Int(state)]
^
../../src/CitronParser.swift:285:32: note: overloads for 'Int' exist with these partially matching parameter lists: (Int64), (Word), (UInt8), (Int8), (UInt16), (Int16), (UInt32), (Int32), (UInt64), (UInt), (Int), (Float), (Double), (Float80), (String, radix: Int), (CGFloat), (NSNumber)
var i = yyReduceOffset[Int(state)]
^
../../src/CitronParser.swift:288:26: error: binary operator '<' cannot be applied to operands of type 'Self.CitronSymbolCode' and 'Int'
assert(lookAhead < yyNumberOfSymbols)
~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~
../../src/CitronParser.swift:288:26: note: expected an argument list of type '(Int, Int)'
assert(lookAhead < yyNumberOfSymbols)
^
../../src/CitronParser.swift:314:27: error: binary operator '<' cannot be applied to operands of type 'Self.CitronRuleNumber' and 'Int'
assert(ruleNumber < yyRuleInfo.count)
~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~
../../src/CitronParser.swift:314:27: note: expected an argument list of type '(Int, Int)'
assert(ruleNumber < yyRuleInfo.count)
^
../../src/CitronParser.swift:316:54: error: cannot invoke initializer for type 'Int' with an argument list of type '(Self.CitronRuleNumber)'
tracePrint("Reducing with rule:", yyRuleText[Int(ruleNumber)])
^
../../src/CitronParser.swift:316:54: note: overloads for 'Int' exist with these partially matching parameter lists: (Int64), (Word), (UInt8), (Int8), (UInt16), (Int16), (UInt32), (Int32), (UInt64), (UInt), (Int), (Float), (Double), (Float80), (String, radix: Int), (CGFloat), (NSNumber)
tracePrint("Reducing with rule:", yyRuleText[Int(ruleNumber)])
^
../../src/CitronParser.swift:320:35: error: cannot invoke initializer for type 'Int' with an argument list of type '(Self.CitronRuleNumber)'
let ruleInfo = yyRuleInfo[Int(ruleNumber)]
^
../../src/CitronParser.swift:320:35: note: overloads for 'Int' exist with these partially matching parameter lists: (Int64), (Word), (UInt8), (Int8), (UInt16), (Int16), (UInt32), (Int32), (UInt64), (UInt), (Int), (Float), (Double), (Float80), (String, radix: Int), (CGFloat), (NSNumber)
let ruleInfo = yyRuleInfo[Int(ruleNumber)]
^
../../src/CitronParser.swift:384:15: error: binary operator '>' cannot be applied to operands of type 'Self.CitronSymbolCode' and 'Int'
if (i > 0 && i < yySymbolName.count) { return yySymbolName[Int(i)] }
~ ^ ~
../../src/CitronParser.swift:384:15: note: expected an argument list of type '(Int, Int)'
if (i > 0 && i < yySymbolName.count) { return yySymbolName[Int(i)] }
^
../../src/CitronParser.swift:384:68: error: cannot invoke initializer for type 'Int' with an argument list of type '(Self.CitronSymbolCode)'
if (i > 0 && i < yySymbolName.count) { return yySymbolName[Int(i)] }
^
../../src/CitronParser.swift:384:68: note: overloads for 'Int' exist with these partially matching parameter lists: (Int64), (Word), (UInt8), (Int8), (UInt16), (Int16), (UInt32), (Int32), (UInt64), (UInt), (Int), (Float), (Double), (Float80), (String, radix: Int), (CGFloat), (NSNumber)
if (i > 0 && i < yySymbolName.count) { return yySymbolName[Int(i)] }
^
make: *** [expr] Error 1