day01

package
v0.0.0-...-44539d3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Part1

func Part1(input string) int

func Part2

func Part2(input string) int

Types

type CalibrationFile

type CalibrationFile struct {
	CalibrationLines []*CalibrationLine `@@*`
}

type CalibrationLine

type CalibrationLine struct {
	Element []*LineElement `@@* Newline`
}

type Char

type Char struct {
	Char string `@Letter`
}

type LineElement

type LineElement struct {
	Char   *Char   `  @@`
	Number *Number `| @@`
}

type NEight

type NEight struct {
	Eight string `@Eight`
}

type NFive

type NFive struct {
	Five string `@Five`
}

type NFour

type NFour struct {
	Four string `@Four`
}

type NNine

type NNine struct {
	Nine string `@Nine`
}

type NOne

type NOne struct {
	One string `@One`
}

type NSeven

type NSeven struct {
	Seven string `@Seven`
}

type NSix

type NSix struct {
	Six string `@Six`
}

type NThree

type NThree struct {
	Three string `@Three`
}

type NTwo

type NTwo struct {
	Two string `@Two`
}

type NZero

type NZero struct {
	Zero string `@"zero"`
}

type Number

type Number struct {
	Literal *NumberLiteral `  @@`
	Word    *NumberWord    `| @@`
}

type NumberLiteral

type NumberLiteral struct {
	NumberLiteral int `@Int`
}

type NumberWord

type NumberWord struct {
	One   *NOne   `  @@`
	Two   *NTwo   `| @@`
	Three *NThree `| @@`
	Four  *NFour  `| @@`
	Five  *NFive  `| @@`
	Six   *NSix   `| @@`
	Seven *NSeven `| @@`
	Eight *NEight `| @@`
	Nine  *NNine  `| @@`
	Zero  *NZero  `| @@`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL