chromium/v8/src/torque/earley-parser.cc

// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "src/torque/earley-parser.h"

#include <algorithm>
#include <optional>
#include <set>
#include <unordered_map>
#include <unordered_set>

#include "src/torque/ast.h"
#include "src/torque/utils.h"

namespace v8::internal::torque {

namespace {

struct LineAndColumnTracker {};

}  // namespace

std::optional<ParseResult> Rule::RunAction(const Item* completed_item,
                                           const LexerResult& tokens) const {}

Symbol& Symbol::operator=(std::initializer_list<Rule> rules) {}

std::vector<const Item*> Item::Children() const {}

std::string Item::SplitByChildren(const LexerResult& tokens) const {}

void Item::CheckAmbiguity(const Item& other, const LexerResult& tokens) const {}

LexerResult Lexer::RunLexer(const std::string& input) {}

Symbol* Lexer::MatchToken(InputPosition* pos, InputPosition end) {}

// This is an implementation of Earley's parsing algorithm
// (https://en.wikipedia.org/wiki/Earley_parser).
const Item* RunEarleyAlgorithm(
    Symbol* start, const LexerResult& tokens,
    std::unordered_set<Item, base::hash<Item>>* processed) {}

// static
DISABLE_CFI_ICALL
bool Grammar::MatchChar(int (*char_class)(int), InputPosition* pos) {}

// static
bool Grammar::MatchChar(bool (*char_class)(char), InputPosition* pos) {}

// static
bool Grammar::MatchString(const char* s, InputPosition* pos) {}

// static
bool Grammar::MatchAnyChar(InputPosition* pos) {}

}  // namespace v8::internal::torque