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-187.mta1.migadu.com (out-187.mta1.migadu.com [95.215.58.187]) by mail-a.sr.ht (Postfix) with ESMTPS id EF88B2008A for <~johnnyrichard/olang-devel@lists.sr.ht>; Mon, 19 Feb 2024 00:26:13 +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=1708302371; 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=090v6oCf3piXpxva1VwjLUNlZ5S656MY1cp0S3W2w71rwxM62RFtZFRnY4wilrBtA84fSU ZtBjHACGDBpystx621k1OLt7xDSP0A9VAHKP7hpdMRrpZ8TBM+1CzcIfkxSSiJfR00a6xL v7N1JW2vb5XoCxrrATNbM23mEvy8rFPXfg6mNI3UjD6NnyN8tgm8qgqMGm8Od/3JYxE6Mo fqZK2eozHhL6Rw/8b+Du053vWup4uI/XF1OyXXQREFpMT0Ra+83BEKQAIgu3lMgl2KNtMI 4M4KBiTVljkBcgaYiuxckZt3y/kcK52Brf/OF3vTxL1d6s9+knL10ogMFNkv1A== From: Johnny Richard To: ~johnnyrichard/olang-devel@lists.sr.ht Cc: Johnny Richard Subject: [PATCH olang v2 0/2] Create --dump-tokens on compiler cli Date: Mon, 19 Feb 2024 02:23:49 +0100 Message-ID: <20240219012457.15107-1-johnny@johnnyrichard.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-TUID: 31Z2Te5XLTmu 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