Class AssemblyTerminal

    • Field Summary

    • Constructor Summary

      Constructors 
      Constructor Description
      AssemblyTerminal​(java.lang.String name)
      Construct a terminal having the give name
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract java.util.Collection<java.lang.String> getSuggestions​(java.lang.String got, java.util.Map<java.lang.String,​java.lang.Long> labels)
      Provide a collection of strings that this terminal would have accepted
      abstract java.util.Collection<? extends AssemblyParseToken> match​(java.lang.String buffer, int pos, AssemblyGrammar grammar, java.util.Map<java.lang.String,​java.lang.Long> labels)
      Attempt to match a token from the input buffer starting at a given position
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AssemblyTerminal

        public AssemblyTerminal​(java.lang.String name)
        Construct a terminal having the give name
        Parameters:
        name -
    • Method Detail

      • match

        public abstract java.util.Collection<? extends AssemblyParseToken> match​(java.lang.String buffer,
                                                                                 int pos,
                                                                                 AssemblyGrammar grammar,
                                                                                 java.util.Map<java.lang.String,​java.lang.Long> labels)
        Attempt to match a token from the input buffer starting at a given position
        Parameters:
        buffer - the input buffer
        pos - the cursor position in the buffer
        grammar - the grammar containing this terminal
        labels - the program labels, if applicable
        Returns:
        the matched token, or null
      • getSuggestions

        public abstract java.util.Collection<java.lang.String> getSuggestions​(java.lang.String got,
                                                                              java.util.Map<java.lang.String,​java.lang.Long> labels)
        Provide a collection of strings that this terminal would have accepted
        Parameters:
        got - the remaining contents of the input buffer
        labels - the program labels, if applicable
        Returns:
        a, possibly empty, collection of suggestions