Interface Parser


public interface Parser
The Parser interface defines methods that all parsers for languages should implement.
Version:
1.0
Author:
Silvere Martin-Michiellot
  • Method Summary

    Modifier and Type
    Method
    Description
    parse(Grammar grammar, String string)
    Parses the given string using the provided grammar.
  • Method Details

    • parse

      TreeModel parse(Grammar grammar, String string)
      Parses the given string using the provided grammar.
      Parameters:
      grammar - the grammar to use for parsing
      string - the string to parse
      Returns:
      a TreeModel representing the parsed structure, where nodes are rules and leaves are terminals