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-179.mta1.migadu.com (out-179.mta1.migadu.com [IPv6:2001:41d0:203:375::b3]) by mail-a.sr.ht (Postfix) with ESMTPS id 1260220167 for <~johnnyrichard/olang-devel@lists.sr.ht>; Mon, 19 Feb 2024 20:07:01 +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=1708373220; 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=GYI9cOHvIN2CCud6XvHuj3C1tVVjvW8a5Bdld0Vy0lI=; b=eNcVyTwJBaoZJn0G4UjoPgNGxsqlLdIb0G2E2HLkxokiRSyZR6tR2A7y3nfR0U8sENkgKm l7upymmjNPxVqoDz9gn7LAJkcddP8JIT/zbRxVA0zVrw9ER20oNAFVUUp0Db24krzDozDD Kxmop7lJRLSJJ2Kzb9R58cxfIQULbDCsGrX9aLAybP/BruOupQLM9ApWxj+A1oY3BcPqPn IkdkCx/H5blRJHWZtGShiWNnFNUBDsA9Pui/OXsWK05sfq6wjAjYzNxsqWu20y4V+kWkvk EimNdbELCO091yQTuQWOl/jro1//J06iMayNS3oWi+c3T2ek0DFkXHlVlDM2YQ== From: Johnny Richard To: ~johnnyrichard/olang-devel@lists.sr.ht Cc: Johnny Richard Subject: [PATCH olang v4 0/4] Create --dump-tokens on compiler cli Date: Mon, 19 Feb 2024 22:04:07 +0100 Message-ID: <20240219210541.25624-1-johnny@johnnyrichard.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-TUID: RFsyTN2oKK0N This patchset creates the lexer and a --dump-tokens functionality for the compiler 0c. Carlos Maniero (1): lexer: test: add integration tests for --dump-tokens Johnny Richard (3): utils: create string_view data structure lexer: create --dump-tokens cli command docs: create man page for 0c compiler .gitignore | 1 + docs/Makefile | 21 ++- docs/manpages/0c.md | 21 +++ examples/main_exit.0 | 3 + src/0c.c | 129 +++++++++++++++++- src/lexer.c | 235 +++++++++++++++++++++++++++++++++ src/lexer.h | 74 +++++++++++ src/string_view.c | 35 +++++ src/string_view.h | 34 +++++ tests/integration/cli_runner.c | 47 ++++++- tests/integration/cli_runner.h | 3 +- tests/integration/cli_test.c | 16 ++- 12 files changed, 604 insertions(+), 15 deletions(-) create mode 100644 docs/manpages/0c.md 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