Skip to content
#

grammar

A grammar describes the syntax of a programming language, and might be defined in Backus-Naur form (BNF). A lexer performs lexical analysis, turning text into tokens. A parser takes tokens and builds a data structure like an abstract syntax tree (AST). The parser is concerned with context: does the sequence of tokens fit the grammar? A compiler is a combined lexer and parser, built for a specific grammar.

Here are 864 public repositories matching this topic...

studoot
studoot commented May 4, 2022

I'm trying out lexy with a re-implementation of a parser I've already got which, in part, parses register names of the form r<0..31> and f<0..15> - i.e. there are 32 general purpose registers (named r0, r1, ... r31) and 16 floating point registers.

I'd like to verify that the register number is in range when parsed, so I'd like to have something like lexy::code_point, which has tr

enhancement help wanted good first issue