Here is a list of definitions for pydsl:
  • Checker(grammar definition , input) -> bool
  • Parser(grammar definition, input) -> ParseTree
  • Lexer(grammar definition, input) -> TokenList (using yield)
  • ASTTranslator(AST definition, input) -> ASTree
Those function/classes are used to archive the DSL workflow:

 Lexer -> Parser -> ASTTranslator (Frontend) -> Interpreter/Output/Bytecode (Backend)  
Any sugestions about the signatures?

Update on 13/7/2012


Here is a more detailed list of abstractions implemented in pydsl
  • Checker(grammar definition , input) -> bool
    •  checks if input is a valid word according to grammar definition
  • Parser(grammar definition, input) -> ParseTree
    •  generates a ParseTree from input 
  • Lexer(grammar definition, input) -> TokenList (using yield)
    • yields tokens from the input
  • Distance(grammar definition, input1, input2) -> int
    • Returns the distance between two inputs according to the grammar 
  • GetGroup (grammar definition, input, groupname) -> TokenList
    • locates locates a group of elements within the input
  • Validator(grammar definition, input) -> TokenList
    • returns a list of invalid token and the nearest alternative
  • Function
    • Standard function
      • Function(function definition, input) -> output
    • Dictionary function Interface
      • Function(function definition, dict) -> outputdict
    • Conversation function Interface
      • Function(workingmemory, function definition, input) -> output 
  • ASTTranslator(AST definition, input) -> ASTree