A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
Loading...
Searching...
No Matches
vocabulary.h File Reference
#include <optional>
#include <string>
#include <string_view>
#include <vector>
#include <absl/base/nullability.h>
#include <absl/container/flat_hash_set.h>
#include <absl/types/span.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  a11::flow::vocabulary::EntryPort
 One implicit port of the entry flow. More...
 
struct  a11::flow::vocabulary::WordDoc
 Documentation for a language word, shared by editor and CLI surfaces. More...
 

Namespaces

namespace  a11
 
namespace  a11::flow
 
namespace  a11::flow::vocabulary
 Word sets and argument shapes shared by language frontends.
 

Enumerations

enum class  a11::flow::vocabulary::StageArgument {
  a11::flow::vocabulary::kNone , a11::flow::vocabulary::kNumber , a11::flow::vocabulary::kExpression , a11::flow::vocabulary::kString ,
  a11::flow::vocabulary::kOptionalString , a11::flow::vocabulary::kOptionalExpression , a11::flow::vocabulary::kSortKey , a11::flow::vocabulary::kFold ,
  a11::flow::vocabulary::kDuration , a11::flow::vocabulary::kStream , a11::flow::vocabulary::kType , a11::flow::vocabulary::kLog ,
  a11::flow::vocabulary::kLogFormat
}
 What a stage takes after its name. More...
 
enum class  a11::flow::vocabulary::WordRole {
  a11::flow::vocabulary::kStage , a11::flow::vocabulary::kBuiltin , a11::flow::vocabulary::kStatement , a11::flow::vocabulary::kDeclaration ,
  a11::flow::vocabulary::kClause , a11::flow::vocabulary::kModifier , a11::flow::vocabulary::kSource , a11::flow::vocabulary::kPortModifier ,
  a11::flow::vocabulary::kFieldModifier , a11::flow::vocabulary::kType , a11::flow::vocabulary::kConstant , a11::flow::vocabulary::kOperatorWord ,
  a11::flow::vocabulary::kStatusCode , a11::flow::vocabulary::kLogLevel , a11::flow::vocabulary::kStatusField , a11::flow::vocabulary::kDurationUnit ,
  a11::flow::vocabulary::kSymbol
}
 The grammar role under which a word is documented. More...
 

Functions

std::string a11::flow::vocabulary::Canonical (std::string_view word)
 Lowercases uniformly upper-case words; leaves mixed-case words unchanged.
 
bool a11::flow::vocabulary::IsShouted (std::string_view word)
 Whether the word, canonicalised, is written entirely in upper case.
 
absl::Span< const EntryPort > a11::flow::vocabulary::EntryPorts ()
 Implicit entry-flow ports in declaration order.
 
absl::Span< const std::string_view > a11::flow::vocabulary::Stages ()
 
std::optional< StageArgument > a11::flow::vocabulary::StageTakes (std::string_view canonical_name)
 What a stage takes, or nullopt if the name is not a stage.
 
std::string_view a11::flow::vocabulary::StageArgumentName (StageArgument argument)
 The spelling of a stage argument kind in the output formats.
 
const WordDoc *absl_nullable a11::flow::vocabulary::StageDocumentation (std::string_view canonical_name)
 Stage documentation, or null for an unknown stage.
 
const WordDoc *absl_nullable a11::flow::vocabulary::BuiltinDocumentation (std::string_view canonical_name)
 Built-in function documentation, or null for an unknown function.
 
bool a11::flow::vocabulary::IsPrimitiveType (std::string_view name)
 Whether a standard type and its conversion are in the primitive prelude.
 
const WordDoc *absl_nullable a11::flow::vocabulary::AnyDocumentation (std::string_view canonical_name)
 Returns documentation under any role, or null when none exists.
 
absl::Span< const WordRole > a11::flow::vocabulary::WordRoles ()
 Every role, for something walking all of them.
 
std::string_view a11::flow::vocabulary::WordRoleName (WordRole role)
 Role name used by flow.vocabulary/v1, such as port_modifier.
 
std::vector< std::string_view > a11::flow::vocabulary::WordsOf (WordRole role)
 Words documented under role, in listing order.
 
const WordDoc *absl_nullable a11::flow::vocabulary::Documentation (WordRole role, std::string_view canonical_name)
 What one word of role does, or nullptr where that table has no entry.
 
absl::Span< const std::string_view > a11::flow::vocabulary::OrderedSymbols ()
 Punctuation and non-word operators, in listing order.
 
const absl::flat_hash_set< std::string_view > & a11::flow::vocabulary::BareStages ()
 Stages accepted without a leading |, such as hits where it.ok.
 
const absl::flat_hash_set< std::string_view > & a11::flow::vocabulary::ParallelStages ()
 Stages that accept parallel n for concurrent value processing.
 
const absl::flat_hash_set< std::string_view > & a11::flow::vocabulary::ReducingStages ()
 Stages that reduce a whole stream to one value.
 
const absl::flat_hash_set< std::string_view > & a11::flow::vocabulary::PositionalStages ()
 Stages that select or group stream values.
 
const absl::flat_hash_set< std::string_view > & a11::flow::vocabulary::Builtins ()
 Built-in functions available to flow expressions.
 
const absl::flat_hash_set< std::string_view > & a11::flow::vocabulary::TypeNames ()
 Built-in port type names. Ports also accept registered tags and media types.
 
bool a11::flow::vocabulary::IsNumericType (std::string_view name)
 
absl::Span< const int > a11::flow::vocabulary::TypeParameters (std::string_view canonical_name)
 Allowed type-parameter counts for a built-in type; empty means none.
 
absl::Span< const std::string_view > a11::flow::vocabulary::OrderedTypeNames ()
 The built-in port type names, in the order a listing reads them.
 
absl::Span< const std::string_view > a11::flow::vocabulary::OrderedBuiltins ()
 The fixed function set, in the order a listing reads it.
 
const absl::flat_hash_set< std::string_view > & a11::flow::vocabulary::StatementWords ()
 Words that open a statement, and so are not read as a name there.
 
absl::Span< const std::string_view > a11::flow::vocabulary::OrderedStatements ()
 Statement starters in completion order, most common first.
 
const absl::flat_hash_set< std::string_view > & a11::flow::vocabulary::ClauseWords ()
 Words inside statements, such as else, parallel, and max.
 
absl::Span< const std::string_view > a11::flow::vocabulary::OrderedClauseWords ()
 The same, in the order they read.
 
const absl::flat_hash_set< std::string_view > & a11::flow::vocabulary::DeclarationWords ()
 Words that declare something inside a flow.
 
absl::Span< const std::string_view > a11::flow::vocabulary::OrderedDeclarations ()
 The declarations in the order they are written in a flow.
 
const absl::flat_hash_set< std::string_view > & a11::flow::vocabulary::ModifierWords ()
 Words that may follow a call's closing parenthesis.
 
absl::Span< const std::string_view > a11::flow::vocabulary::OrderedModifiers ()
 Call modifiers in source order, including forward headers.
 
const absl::flat_hash_set< std::string_view > & a11::flow::vocabulary::SourceWords ()
 Words that open a pipeline source rather than naming one: status, zip.
 
const absl::flat_hash_set< std::string_view > & a11::flow::vocabulary::PortModifierWords ()
 What a port says about itself after its type: stream, required.
 
absl::Span< const std::string_view > a11::flow::vocabulary::OrderedPortModifiers ()
 The same, in the order a port writes them.
 
const absl::flat_hash_set< std::string_view > & a11::flow::vocabulary::FieldModifierWords ()
 Modifiers after a struct field's type.
 
absl::Span< const std::string_view > a11::flow::vocabulary::OrderedFieldModifiers ()
 Field modifiers in required source order.
 
absl::Span< const std::string_view > a11::flow::vocabulary::StatusCodes ()
 Abseil's canonical status codes, lower case, which is what fail names.
 
bool a11::flow::vocabulary::IsStatusCode (std::string_view word)
 Whether a word names a canonical status code, in either case.
 
absl::Span< const std::string_view > a11::flow::vocabulary::LogLevels ()
 Log levels accepted by log and logf, quietest first.
 
bool a11::flow::vocabulary::IsLogLevel (std::string_view word)
 Whether a word names a log level, in either case.
 
const absl::flat_hash_set< std::string_view > & a11::flow::vocabulary::StatusFields ()
 The fields of a status record: what reading an outcome gives.
 
absl::Span< const std::string_view > a11::flow::vocabulary::OrderedStatusFields ()
 The same, in the order a status record is written and read.
 
const absl::flat_hash_set< std::string_view > & a11::flow::vocabulary::ConstantWords ()
 Literals that are words: true, false, null, it.
 
const absl::flat_hash_set< std::string_view > & a11::flow::vocabulary::OperatorWords ()
 Operators that are words: and, or, not.
 
absl::Span< const std::string_view > a11::flow::vocabulary::DurationUnits ()
 Duration suffixes a number may carry, shortest unit first.
 
std::optional< double > a11::flow::vocabulary::DurationUnitSeconds (std::string_view unit)
 The seconds one of that unit is, or nullopt if it is not a unit.