Package sc.parser

Class Symbol

    • Field Detail

      • EOF

        public static final java.lang.String EOF
      • expectedValue

        public ArrString expectedValue
    • Constructor Detail

      • Symbol

        public Symbol​(java.lang.String id,
                      int options,
                      java.lang.String symVal)
      • Symbol

        public Symbol​(int options,
                      java.lang.String symVal)
      • Symbol

        public Symbol​(java.lang.String symVal)
    • Method Detail

      • parse

        public java.lang.Object parse​(Parser parser)
        Description copied from class: Parselet
        The main parse method for the parselet. Use the supplied parser and generate a 'result' either a CharSequence or an IParseNode.
        Specified by:
        parse in class Parselet
      • restore

        public java.lang.Object restore​(Parser parser,
                                        ISemanticNode oldModel,
                                        RestoreCtx rctx,
                                        boolean inherited)
        Description copied from class: Parselet
        The parselet method to re-create the parse node tree given the resulting model.
        Specified by:
        restore in class Parselet
      • saveParse

        public void saveParse​(IParseNode pn,
                              ISemanticNode sn,
                              SaveParseCtx spctx)
        Description copied from class: Parselet
        The parselet method to save parselet ids, offsets, string-lengths etc. The info that when augmented by a de-serialized semantic node quickly reproduces the parse-node tree and attaches it to the model
        Specified by:
        saveParse in class Parselet
      • toHeaderString

        public java.lang.String toHeaderString​(java.util.Map<Parselet,​java.lang.Integer> visited)
        toHeaderString in class Parselet
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object
      • match

        public boolean match​(SemanticContext ctx,
                             java.lang.Object value)
      • isNullValid

        public boolean isNullValid()
        Description copied from class: Parselet
        For most parselets (all but EOF), null is not a real value.
        isNullValid in class Parselet
      • addExcludedValues

        public void addExcludedValues​(java.lang.String... values)