class Llamero::Grammar::Builder::GrammarBuilder(T)
- Llamero::Grammar::Builder::GrammarBuilder(T)
- Reference
- Object
Overview
The primary builder for creating a grammar file or CLI output.
This is not meant to be used directly, but rather through the Grammar
class.
Defined in:
grammars/builder/grammar_builder.crConstructors
-
.new(grammar_class : T)
Initialize with the grammar class that you want to use
Instance Method Summary
-
#child_grammar_output : IO::Memory
Collection of the IO from generating the grammar output for each child object type
-
#child_grammar_output=(child_grammar_output : IO::Memory)
Collection of the IO from generating the grammar output for each child object type
-
#create_grammar_output(is_root_object : Bool = false) : IO
Creates the output for this grammar.
- #grammar_class : T
- #grammar_class=(grammar_class : T)
-
#grammar_output : IO::Memory
The final grammar output
-
#grammar_output=(grammar_output : IO::Memory)
The final grammar output
-
#list_of_non_primitive_instance_vars_and_types : Array(Hash(String, String))
A non-unique list of all non-primitive field types that are also objects from BaseGrammar
-
#list_of_non_primitive_instance_vars_and_types=(list_of_non_primitive_instance_vars_and_types : Array(Hash(String, String)))
A non-unique list of all non-primitive field types that are also objects from BaseGrammar
-
#list_of_object_types_to_create_rows_for : Array(String)
Tracks a unique list of objects to create as this grammar is created.
-
#list_of_object_types_to_create_rows_for=(list_of_object_types_to_create_rows_for : Array(String))
Tracks a unique list of objects to create as this grammar is created.
-
#list_of_primitive_instance_vars_and_types : Array(Hash(String, String))
A non-unqiue list of all primitive field types that need to be in the grammar output
-
#list_of_primitive_instance_vars_and_types=(list_of_primitive_instance_vars_and_types : Array(Hash(String, String)))
A non-unqiue list of all primitive field types that need to be in the grammar output
-
#list_of_primitive_types_to_create_rows_for : Array(String)
Tracks the JSON primitives that are being used in this grammar.
-
#list_of_primitive_types_to_create_rows_for=(list_of_primitive_types_to_create_rows_for : Array(String))
Tracks the JSON primitives that are being used in this grammar.
-
#rows : Array(Row)
The completed grammar rows
-
#rows=(rows : Array(Row))
The completed grammar rows
Constructor Detail
Instance Method Detail
Collection of the IO from generating the grammar output for each child object type
Collection of the IO from generating the grammar output for each child object type
Creates the output for this grammar.
A non-unique list of all non-primitive field types that are also objects from BaseGrammar
A non-unique list of all non-primitive field types that are also objects from BaseGrammar
Tracks a unique list of objects to create as this grammar is created. This does not include primitives.
Tracks a unique list of objects to create as this grammar is created. This does not include primitives.
A non-unqiue list of all primitive field types that need to be in the grammar output
A non-unqiue list of all primitive field types that need to be in the grammar output
Tracks the JSON primitives that are being used in this grammar.
Tracks the JSON primitives that are being used in this grammar.