Class Reducer

java.lang.Object
eu.bandm.tools.ramus.ogma.Reducer

@Generated(generator="eu.bandm.tools.expander", version="1.3.1", timestamp="2026-08-26T09:14:17") public class Reducer extends Object
Framework factories for procedural AST construction.
  • Method Details

    • reduce

      @Deprecated(forRemoval=false, since="1.0") public static <D, T, A1, R> Reading<D,T,R> reduce(ReducerFactory.Constructor1<D,A1,R> cons, Reading<D,T,? extends A1> arg1)
      Creates a compound reading for AST nodes with one parsed argument.

      The argument is parsed in a location-tracking context. Then the given constructor is invoked to create an AST node.

      Type Parameters:
      D - the type of source document identifiers
      T - the type of token types
      A1 - the type of the (first) parsed argument value
      R - the type of resulting AST nodes
      Parameters:
      cons - the AST node constructor
      arg1 - the reading for the (first) parsed argument
      Returns:
      a compound reading using the AST node constructor for its root
    • reduce

      @Deprecated(forRemoval=false, since="1.0") public static <D, T, A1, A2, R> Reading<D,T,R> reduce(ReducerFactory.Constructor2<D,A1,A2,R> cons, Reading<D,T,? extends A1> arg1, Reading<D,T,? extends A2> arg2)
      Creates a compound reading for AST nodes with two parsed arguments.

      The arguments are parsed sequentially in a location-tracking context. Then the given constructor is invoked to create an AST node.

      Type Parameters:
      D - the type of source document identifiers
      T - the type of token types
      A1 - the type of the first parsed argument value
      A2 - the type of the second parsed argument value
      R - the type of resulting AST nodes
      Parameters:
      cons - the AST node constructor
      arg1 - the reading for the first parsed argument
      arg2 - the reading for the second parsed argument
      Returns:
      a compound reading using the AST node constructor for its root
    • reduce

      @Deprecated(forRemoval=false, since="1.0") public static <D, T, A1, A2, A3, R> Reading<D,T,R> reduce(ReducerFactory.Constructor3<D,A1,A2,A3,R> cons, Reading<D,T,? extends A1> arg1, Reading<D,T,? extends A2> arg2, Reading<D,T,? extends A3> arg3)
      Creates a compound reading for AST nodes with three parsed arguments.

      The arguments are parsed sequentially in a location-tracking context. Then the given constructor is invoked to create an AST node.

      Type Parameters:
      D - the type of source document identifiers
      T - the type of token types
      A1 - the type of the first parsed argument value
      A2 - the type of the second parsed argument value
      A3 - the type of the third parsed argument value
      R - the type of resulting AST nodes
      Parameters:
      cons - the AST node constructor
      arg1 - the reading for the first parsed argument
      arg2 - the reading for the second parsed argument
      arg3 - the reading for the third parsed argument
      Returns:
      a compound reading using the AST node constructor for its root
    • reduce

      @Deprecated(forRemoval=false, since="1.0") public static <D, T, A1, A2, A3, A4, R> Reading<D,T,R> reduce(ReducerFactory.Constructor4<D,A1,A2,A3,A4,R> cons, Reading<D,T,? extends A1> arg1, Reading<D,T,? extends A2> arg2, Reading<D,T,? extends A3> arg3, Reading<D,T,? extends A4> arg4)
      Creates a compound reading for AST nodes with four parsed arguments.

      The arguments are parsed sequentially in a location-tracking context. Then the given constructor is invoked to create an AST node.

      Type Parameters:
      D - the type of source document identifiers
      T - the type of token types
      A1 - the type of the first parsed argument value
      A2 - the type of the second parsed argument value
      A3 - the type of the third parsed argument value
      A4 - the type of the fourth parsed argument value
      R - the type of resulting AST nodes
      Parameters:
      cons - the AST node constructor
      arg1 - the reading for the first parsed argument
      arg2 - the reading for the second parsed argument
      arg3 - the reading for the third parsed argument
      arg4 - the reading for the fourth parsed argument
      Returns:
      a compound reading using the AST node constructor for its root
    • reduce

      @Deprecated(forRemoval=false, since="1.0") public static <D, T, A1, A2, A3, A4, A5, R> Reading<D,T,R> reduce(ReducerFactory.Constructor5<D,A1,A2,A3,A4,A5,R> cons, Reading<D,T,? extends A1> arg1, Reading<D,T,? extends A2> arg2, Reading<D,T,? extends A3> arg3, Reading<D,T,? extends A4> arg4, Reading<D,T,? extends A5> arg5)
      Creates a compound reading for AST nodes with five parsed arguments.

      The arguments are parsed sequentially in a location-tracking context. Then the given constructor is invoked to create an AST node.

      Type Parameters:
      D - the type of source document identifiers
      T - the type of token types
      A1 - the type of the first parsed argument value
      A2 - the type of the second parsed argument value
      A3 - the type of the third parsed argument value
      A4 - the type of the fourth parsed argument value
      A5 - the type of the fifth parsed argument value
      R - the type of resulting AST nodes
      Parameters:
      cons - the AST node constructor
      arg1 - the reading for the first parsed argument
      arg2 - the reading for the second parsed argument
      arg3 - the reading for the third parsed argument
      arg4 - the reading for the fourth parsed argument
      arg5 - the reading for the fifth parsed argument
      Returns:
      a compound reading using the AST node constructor for its root
    • reduce

      @Deprecated(forRemoval=false, since="1.0") public static <D, T, A1, A2, A3, A4, A5, A6, R> Reading<D,T,R> reduce(ReducerFactory.Constructor6<D,A1,A2,A3,A4,A5,A6,R> cons, Reading<D,T,? extends A1> arg1, Reading<D,T,? extends A2> arg2, Reading<D,T,? extends A3> arg3, Reading<D,T,? extends A4> arg4, Reading<D,T,? extends A5> arg5, Reading<D,T,? extends A6> arg6)
      Creates a compound reading for AST nodes with six parsed arguments.

      The arguments are parsed sequentially in a location-tracking context. Then the given constructor is invoked to create an AST node.

      Type Parameters:
      D - the type of source document identifiers
      T - the type of token types
      A1 - the type of the first parsed argument value
      A2 - the type of the second parsed argument value
      A3 - the type of the third parsed argument value
      A4 - the type of the fourth parsed argument value
      A5 - the type of the fifth parsed argument value
      A6 - the type of the sixth parsed argument value
      R - the type of resulting AST nodes
      Parameters:
      cons - the AST node constructor
      arg1 - the reading for the first parsed argument
      arg2 - the reading for the second parsed argument
      arg3 - the reading for the third parsed argument
      arg4 - the reading for the fourth parsed argument
      arg5 - the reading for the fifth parsed argument
      arg6 - the reading for the sixth parsed argument
      Returns:
      a compound reading using the AST node constructor for its root
    • reduce

      @Deprecated(forRemoval=false, since="1.0") public static <D, T, A1, A2, A3, A4, A5, A6, A7, R> Reading<D,T,R> reduce(ReducerFactory.Constructor7<D,A1,A2,A3,A4,A5,A6,A7,R> cons, Reading<D,T,? extends A1> arg1, Reading<D,T,? extends A2> arg2, Reading<D,T,? extends A3> arg3, Reading<D,T,? extends A4> arg4, Reading<D,T,? extends A5> arg5, Reading<D,T,? extends A6> arg6, Reading<D,T,? extends A7> arg7)
      Creates a compound reading for AST nodes with seven parsed arguments.

      The arguments are parsed sequentially in a location-tracking context. Then the given constructor is invoked to create an AST node.

      Type Parameters:
      D - the type of source document identifiers
      T - the type of token types
      A1 - the type of the first parsed argument value
      A2 - the type of the second parsed argument value
      A3 - the type of the third parsed argument value
      A4 - the type of the fourth parsed argument value
      A5 - the type of the fifth parsed argument value
      A6 - the type of the sixth parsed argument value
      A7 - the type of the seventh parsed argument value
      R - the type of resulting AST nodes
      Parameters:
      cons - the AST node constructor
      arg1 - the reading for the first parsed argument
      arg2 - the reading for the second parsed argument
      arg3 - the reading for the third parsed argument
      arg4 - the reading for the fourth parsed argument
      arg5 - the reading for the fifth parsed argument
      arg6 - the reading for the sixth parsed argument
      arg7 - the reading for the seventh parsed argument
      Returns:
      a compound reading using the AST node constructor for its root