From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mail-a.sr.ht; dkim=pass header.d=johnnyrichard.com header.i=@johnnyrichard.com Received: from out-174.mta0.migadu.com (out-174.mta0.migadu.com [91.218.175.174]) by mail-a.sr.ht (Postfix) with ESMTPS id AB6032008A for <~johnnyrichard/olang-devel@lists.sr.ht>; Mon, 19 Feb 2024 00:19:54 +0000 (UTC) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=johnnyrichard.com; s=key1; t=1708301994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=4YHP+WR6pVnpB8rycasHV/QAlADOStEHMzkEQSogXK0=; b=Rj2d/vVT/BSKpV8OQ+P6obErJGrdDV272XFhOrb9B3/39xbpgnTX7QvhXa+B2zITTOeCme C3DO3EE3aT8P+GGIJ7TcOAPUtBQpLNl4nyS5M0hFtHmtUcJh9i3ituQ2LTBYF+Net8BuW6 bG2MIphO6vzA/fhZT3z0/4g9JBlSXfP0rE1AOxgk9Z5IwqwOfPYAlOS4BZtFN/afpl0ARB m7Mita341nfF8HngRXqif/qAkD/PFJTtNJxjlxgxgvcqQikW8TaAl8mVEs7ehd0th8aY2M DMNfxJl+hxRqBP9DqYJBqJ2MijSz04NOAy1/EO2SdFzRdVFBsQ9l4z8+tZEIPw== From: Johnny Richard To: ~johnnyrichard/olang-devel@lists.sr.ht Cc: Johnny Richard Subject: [PATCH olang 0/2] Create --dump-tokens on compiler cli Date: Mon, 19 Feb 2024 02:15:37 +0100 Message-ID: <20240219011835.14769-1-johnny@johnnyrichard.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-TUID: LXi8nlVdpctv This patchset creates the lexer and leave 3 TODO for man documents and test (unit / integration). Johnny Richard (2): utils: create string_view data structure lexer: create --dump-tokens cli command examples/main_exit.0 | 3 + src/0c.c | 121 ++++++++++++++++++++++- src/lexer.c | 224 +++++++++++++++++++++++++++++++++++++++++++ src/lexer.h | 74 ++++++++++++++ src/string_view.c | 35 +++++++ src/string_view.h | 34 +++++++ 6 files changed, 489 insertions(+), 2 deletions(-) create mode 100644 examples/main_exit.0 create mode 100644 src/lexer.c create mode 100644 src/lexer.h create mode 100644 src/string_view.c create mode 100644 src/string_view.h -- 2.43.2