klue-langcraft 0.0.6 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Read DSL code from file
4
+ dsl_code = File.read('workflow_dsl.rb')
5
+
6
+ # Tokenize the DSL code
7
+ tokenizer = Tokenizer.new(dsl_code)
8
+ tokenizer.tokenize
9
+
10
+ # Parse tokens into an AST
11
+ parser = Parser.new(tokenizer.tokens, schema)
12
+ ast = parser.parse
13
+
14
+ # Output the AST
15
+ puts ast.inspect
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Klue
4
+ module Langcraft
5
+ # Tokenizer class
6
+ class Tokenizer
7
+ attr_reader :tokens
8
+
9
+ def initialize(code)
10
+ @code = code
11
+ @tokens = []
12
+ end
13
+
14
+ def tokenize
15
+ # Implement logic to convert code into tokens
16
+ # Handle strings, symbols, keywords, and delimiters
17
+ end
18
+ end
19
+ end
20
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Klue
4
4
  module Langcraft
5
- VERSION = '0.0.6'
5
+ VERSION = '0.1.0'
6
6
  end
7
7
  end
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "klue-langcraft",
3
- "version": "0.0.6",
3
+ "version": "0.1.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "klue-langcraft",
9
- "version": "0.0.6",
9
+ "version": "0.1.0",
10
10
  "devDependencies": {
11
11
  "@klueless-js/semantic-release-rubygem": "github:klueless-js/semantic-release-rubygem",
12
12
  "@semantic-release/changelog": "^6.0.3",
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "klue-langcraft",
3
- "version": "0.0.6",
3
+ "version": "0.1.0",
4
4
  "description": "Domain Specific Language Crafting",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: klue-langcraft
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-09-20 00:00:00.000000000 Z
11
+ date: 2024-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: k_log
@@ -48,12 +48,25 @@ files:
48
48
  - Rakefile
49
49
  - bin/console
50
50
  - bin/setup
51
+ - docs/dsl-examples.md
52
+ - docs/dsl-rules.md
53
+ - docs/dsl-samples/index.md
54
+ - docs/dsl-samples/youtube-launch-optimizer-old.klue
55
+ - docs/dsl-samples/youtube-launch-optimizer-strawberry.json
56
+ - docs/dsl-samples/youtube-launch-optimizer-strawberry.klue
57
+ - docs/dsl-samples/youtube-launch-optimizer.defn.klue
58
+ - docs/dsl-samples/youtube-launch-optimizer.json
59
+ - docs/dsl-samples/youtube-launch-optimizer.klue
51
60
  - docs/project-plan/project-plan.md
52
61
  - docs/project-plan/project.drawio
53
62
  - docs/project-plan/project_done.svg
54
63
  - docs/project-plan/project_in_progress.svg
55
64
  - docs/project-plan/project_todo.svg
56
65
  - lib/klue/langcraft.rb
66
+ - lib/klue/langcraft/-brief.md
67
+ - lib/klue/langcraft/parser.rb
68
+ - lib/klue/langcraft/sample_usage.rb
69
+ - lib/klue/langcraft/tokenizer.rb
57
70
  - lib/klue/langcraft/version.rb
58
71
  - package-lock.json
59
72
  - package.json