]> www.ljiriste.work Git - KyciFTA/commitdiff
Change grammar not to parse shared object path
authorLukáš Jiřiště <redacted>
Tue, 30 Jun 2026 18:07:30 +0000 (20:07 +0200)
committerLukáš Jiřiště <redacted>
Tue, 30 Jun 2026 18:10:28 +0000 (20:10 +0200)
It is not useful to parse the path, because the whole path may be given
to OS for the loading.
Also event_name was added to grammar for more structure.

grammar
src/main.c

diff --git a/grammar b/grammar
index 9bef2ae3cab3677fd77e5f3caf4a1e1d815584be..f7697b7287487d05a9ab3c0e21e49aff34d9197c 100644 (file)
--- a/grammar
+++ b/grammar
@@ -10,8 +10,8 @@ system_def -> fta_logic
 fta_logic -> fta_sum
 fta_sum -> fta_product PLUS fta_sum
 fta_sum -> fta_product
-fta_product -> name TIMES fta_product
-fta_product -> name
+fta_product -> event_name TIMES fta_product
+fta_product -> event_name
 fta_product -> LEFT_PARA fta_logic RIGHT_PARA
 fta_product -> N_OUT_OF_K LEFT_PARA INT COMMA list RIGHT_PARA
 list -> fta_logic COMMA list
@@ -25,10 +25,9 @@ mantisa -> INT
 mantisa -> INT DOT INT
 exponent -> EXP INT
 exponent -> EXP MINUS INT
-classname -> name
-objectname -> name
+classname -> event_name
+objectname -> event_name
+event_name -> name
 function_name -> name
-dynamic_library -> path
-path -> WORD SLASH path
-path -> WORD
+dynamic_library -> WORD
 name -> WORD
index 4ed5540b19391da5e4806c5525e80c494b411a0c..2a55105ea4c907c096fe58d1d573e2f03aa827ca 100644 (file)
@@ -58,7 +58,6 @@ typedef enum e_single_char_terminal
        PLUS,
        RIGHT_PARA,
        LEFT_PARA,
-       SLASH,
        MINUS,
 
        single_char_terminal_count
@@ -93,7 +92,6 @@ const char    *g_keyword_strings[keyword_count] = {
        [PLUS] = "+",
        [RIGHT_PARA] = ")",
        [LEFT_PARA] = "(",
-       [SLASH] = "/",
        [EXP] = "e",
        [FROM] = "FROM",
        [ATOM] = "ATOM",
@@ -115,7 +113,6 @@ const char  *g_token_strings[terminal_count] = {
        [LEFT_PARA] = "LEFT_PARA",
        [SYSTEM] = "SYSTEM",
        [INSTANTIATE] = "INSTANTIATE",
-       [SLASH] = "SLASH",
        [WORD] = "WORD",
        [INT] = "INT",
        [MINUS] = "MINUS",