Package eu.bandm.tools.d2d2.parser2


package eu.bandm.tools.d2d2.parser2
  • Class
    Description
    Hand-written Ramus-based lexer and parser for d2d definition files.
     
    Enumeration of token types.
     
    TLex<D,T>
    Item continuation Item action (TLex context) | ConsumeOrShift c char cset CharSet actionAfterTest(TLex context) | | Consume | | Shift | ChoiceOrState alternatives SEQ ConsumeOrShift other OPT Otherwise actionAfterTest(TLex context) | | Choise | | State | Other | CloseState | Append text OPT string | Deliver reduce OPT Function t TokenType | Text2Token fun BiFunction<String,Location,Tokentype> | Text2cont fun BiFunction<String,Location,Tokentype> | Error text String
    Append the given text or the last consumed character to TLex.outBuffer
    Steps through all alternatives (which must be Consumes or Shifts) and calls their "test()" and "actionAfterText()" separately.
     
     
    If the test is positive (look-ahead char is equal to c or is in set cset) then consume this character = remove it from the input and get the next look-ahead.
     
    Constructcs a token with the given type and the text accumulated in "TLex.outBuffer" and the location from "TLex.location()".
    Can be implemented by a token type to get a printable text.
    TLex.Error<DD,TT>
    Delivers a token with the error token type (as defined when constructing TLex) and the given type.
    TLex.Item<DD,TT>
     
    TLex.Other<DD,TT>
    Only a wrapper needed for the construction interface.
    TLex.Shift<DD,TT>
    If the test is positive (look-ahead char is equal to c or is in set cset) then append this character to the output buffer "Tlex.oputBuffer" and consume this character.
    TLex.State<DD,TT>
    Pushes itself onto the stateStack and the current input location to the locstack.
    Calculates the contiunation (=the following lexer code) from the vaue accumulated in the TLex.outBuffer.
    Same as deliver, but not the token factory stord in TLex but the function is used for constructing the token.
    A simple default implementation of Tokens.