Bison optionale elemente



  • Hallo vielleicht hat schon jemand Erfahrung,

    ich möchte Bison sagen, dass manche Elemente optional sind.

    beispiel: ICH MATCHE AUCH MIT ?OPTIONALEM PARAMETER? {match()}
    ;

    meine Lösung bisher ist, dass ich einen teil immer rausziehe:

    beispiel: teil {match()}
    ;
    beispiel: teil OPTIONALEM PARAMETER { match()}
    ;
    teil: ICH MATCHE AUCH MIT
    ;

    Das ist bei meiner Anwendung ziemlich mühsam und unübersichtlich


Anmelden zum Antworten