(require-extension lalr) (define eolian-parser (lalr-parser (output: eolian-parser "eolian.yy.scm") (out-table: "eolian.out") (expect: 0) ;; TOKEN DEFINITIONS (DOT : * < > = VALUE DOC COMM LEGACY COMMA SEMICOL LBR RBR LPAR RPAR ACCESSOR ARRAY ITERATOR HASH LIST @EXTERN @FREE ABSTRACT CLASS MIXIN IFACE STRUCT ENUM TYPE CONST VAR OWN FREE TRUE FALSE NULL NUM STR CHAR OP LEGACY_PREFIX EO_PREFIX METHODS EVENTS DATA IMPLEMENTS CONSTRUCTORS CONSTRUCTOR DESTRUCTOR @AUTO @EMPTY @PROTECTED @CONST @CLASS @PURE_VIRTUAL PARAMS @PRIVATE @BETA @HOT @PROPERTY GET SET KEYS VALUES @NONULL @NULLABLE @OPTIONAL @IN @OUT @INOUT @WARN_UNUSED RETURN) ;; RULES (op (OP) : $1 (*) : $1 (<) : $1 (>) : $1 (=) : $1) (may-dot (DOT) : $1 () : #f) (value (VALUE) : $1) (name (value) : $1) (mult-name (mult-name COMMA name) : (cons $1 $2) (name) : $1) (name-ns (value) : $1 (value DOT name-ns) : (cons $1 $3)) (mult-name-ns (mult-name-ns COMMA name-ns) : (cons $1 $3) (name-ns) : $1) (ctor-mult-name-ns (ctor-mult-name-ns ctor-mult-name-ns) : (cons $1 $2) (may-dot name-ns SEMICOL) : (cons $1 $2)) (ignore (DOC) : #f (COMM) : #f (LEGACY) : #f (ignore DOC) : #f (ignore COMM) : #f (ignore LEGACY) : #f () : #f) (unit (ABSTRACT class-hdr LBR ignore class-body RBR) : (gen-unit-abstract $2 $5) (CLASS class-hdr LBR ignore class-body RBR) : (gen-unit-class $2 $5) (MIXIN class-hdr LBR ignore class-body-mixin RBR) : (gen-unit-mixin $2 $5) (IFACE class-hdr LBR ignore class-body-iface RBR) : (gen-unit-iface $2 $5) (TYPE type-struct-attrs name-ns : type-struct-enum SEMICOL ignore) : (gen-unit-type $2 $3 $5) (CONST name-ns : type may-expr-assign SEMICOL ignore) : (gen-unit-const $2 $4 $5) (VAR may-extern name-ns : type may-expr-assign SEMICOL ignore) : (gen-unit-var $2 $3 $5 $6) (struct) : (gen-unit-struct $1) (enum) : (gen-unit-enum $1)) (type-struct-enum (type) : $1 (struct) : $1 (enum) : $1) (may-expr-assign (= expr) : $2 () : #f) (type (CONST LPAR type RPAR) : (gen-type-const $3) (OWN LPAR type-ptr RPAR) : (gen-type-own $3) (FREE LPAR type-ptr COMMA name RPAR) : (gen-type-free $3 $5) (STRUCT name-ns) : (gen-type-struct name: $2) (STRUCT LBR ignore mult-struct-field RBR) : (gen-type-struct field: $4) (ENUM name-ns) : (gen-type-enum $2) (type *) : (gen-type-ptr $1) (type-complex < mult-type >) : (gen-type-cplx $1 $3) (name-ns) : (gen-type-name $1)) (type-ptr (value) : $1) (type-complex (ACCESSOR) : $1 (ARRAY) : $1 (ITERATOR) : $1 (HASH) : $1 (LIST) : $1) (mult-type (type mult-type) : (cons $1 $2) (type) : $1) (type-struct-attr (@EXTERN) : $1 (@FREE LPAR name RPAR) : (cons $1 $3)) (type-struct-attrs (type-struct-attrs type-struct-attr) : (cons $1 $2) (type-struct-attr) : $1) (struct (STRUCT type-struct-attrs name-ns SEMICOL) : (gen-struct $2 $3) (STRUCT type-struct-attrs name-ns LBR ignore mult-struct-field RBR) : (gen-struct $2 $3 $6)) (struct-field (name : type SEMICOL ignore) : (struct-field $1 $3)) (mult-struct-field (mult-struct-field struct-field) : (cons $1 $2) (struct-field) : $1) (enum (ENUM may-extern name-ns LBR ignore enum-fields ignore RBR) : (gen-enum $2 $3 $6)) (may-extern (@EXTERN) : $1 () : #f) (enum-field (name) : (enum-field $1) (name = expr) : (enum-field $1 $3)) (enum-fields (enum-fields COMMA ignore enum-field) : (cons $1 $3) (enum-field) : $1) (expr (TRUE) : $1 (FALSE) : $1 (NULL) : $1 (NUM) : $1 (STR) : $1 (CHAR) : $1 (expr OP expr) : (cons $1 $2 $3) (OP expr) : (cons $1 $2) (name-ns) : $1) (class-hdr (name-ns) : (class-hdr $1) (name-ns LPAR mult-name-ns RPAR) : (class-hdr $1 $3)) (class-body-common (LEGACY_PREFIX : VALUE SEMICOL) : (class-body legacy: $3) (EO_PREFIX : VALUE SEMICOL) : (class-body eo: $3) (METHODS LBR mult-method-prop RBR) : (class-body methods: $3) (EVENTS LBR mult-event RBR) : (class-body events: $3)) (mult-method-prop (mult-method-prop mult-method-prop) : (cons $1 $2) (method) : $1 (property) : $1) (class-body-data (DATA : VALUE SEMICOL) : (class-body-data $3)) (class-body-impls (IMPLEMENTS : LBR mult-impl RBR) : (class-body-impls $4)) (class-body-ctors (CONSTRUCTORS LBR ctor-mult-name-ns RBR) : (class-body-ctors $3)) (class-body (class-body class-body) : (cons $1 $2) (class-body-common) : $1 (class-body-data) : $1 (class-body-impls) : $1 (class-body-ctors) : $1) (class-body-iface (class-body-iface class-body-iface) : (cons $1 $2) (class-body-common) : $1 (IMPLEMENTS LBR mult-impl-common RBR) : (class-body-implements $3)) (class-body-mixin (class-body-mixin class-body-mixin) : (cons $1 $2) (class-body-common) : $1 (class-body-data) : $1 (class-body-impls) : $1) (impl-common (CLASS DOT CONSTRUCTOR SEMICOL) : (impl-constructor) (CLASS DOT DESTRUCTOR SEMICOL) : (impl-destructor)) (mult-impl-common (impl-common impl-common) : (cons $1 $2) (impl-common) : $1) (impl (impl-common) : $1 (may-auto-empty may-dot name-ns SEMICOL) : (impl $1 $2 $3)) (mult-impl (mult-impl mult-impl) : (cons $1 $2) (impl) : $1) (may-auto-empty (@AUTO) : $1 (@EMPTY) : $1 () : #f) (event (mult-name event-modifiers may-event-type SEMICOL) : (event $1 $2 $3)) (mult-event (mult-event mult-event) : (cons $1 $2) (event) : $1) (may-event-type (: type) : $2) (event-modifiers (event-modifiers event-modifiers) : (cons $1 $2) (@PRIVATE) : $1 (@PROTECTED) : $1 (@BETA) : $1 (@HOT) : $1) (method (name method-modifiers LBR mult-method-body RBR) : (method $1 $2 $4)) (method-modifiers (method-modifiers method-modifiers) : (cons $1 $2) (@PROTECTED) : $1 (@CONST) : $1 (@CLASS) : $1 (@PURE_VIRTUAL) : $1) (method-body (return) : (method-body return: $1) (legacy) : (method-body legacy: $1) (ignore) : #f (PARAMS LBR mult-param RBR) : (method-body params: $3)) (mult-method-body (mult-method-body method-body) : (cons $1 $2) (method-body) : $1) (property (@PROPERTY name property-modifiers LBR property-body RBR) : (property $2 $3 $5)) (property-modifiers (property-modifiers property-modifiers) : (cons $1 $2) (@PROTECTED) : $1 (@CLASS) : $1 (@PURE_VIRTUAL) : $1) (property-body (property-body property-body) : (cons $1 $2) (GET may-pure-virtual LBR ignore or-return-legacy RBR) : (property-body get: $2 $4) (SET may-pure-virtual LBR ignore or-return-legacy RBR) : (property-body set: $2 $4) (KEYS LBR param-nodir RBR) : (property-body keys: $3) (VALUES LBR param-nodir RBR) : (property-body values: $3)) (or-return-legacy (or-return-legacy or-return-legacy) : (cons $1 $2) (return) : $1 (legacy) : $1) (may-pure-virtual (@PURE_VIRTUAL) : $1 () : #f) (param-nodir (name : type may-param-expr param-nodir-modifiers SEMICOL ignore) : (param-nodir $1 $3 $4 $5)) (may-param-expr (LPAR expr RPAR) : $1 () : #f) (param-nodir-modifiers (param-nodir-modifiers param-nodir-modifiers) : (cons $1 $2) (@NONULL) : $1 (@NULLABLE) : $1 (@OPTIONAL) : $1) (param (param-modifiers param-nodir) : (param $1 $2)) (mult-param (mult-param mult-param) : (cons $1 $2) (param) : $1) (param-modifiers (@IN) : $1 (@OUT) : $1 (@INOUT) : $1 () : #f) (legacy (LEGACY : name SEMICOL) : (legacy $3)) (return-suffix (may-return-expr may-warn-unused SEMICOL ignore) : (return-suffix $1 $2)) (may-return-expr (LPAR expr RPAR) : $2 () : #f) (may-warn-unused (@WARN_UNUSED) : $1 () : #f) (return (RETURN : type return-suffix) : (return $3 $4)) ))