diff --git a/Tmain/list-roles.d/stdout-expected.txt b/Tmain/list-roles.d/stdout-expected.txt index e40d88ea5c..6dfc210c6c 100644 --- a/Tmain/list-roles.d/stdout-expected.txt +++ b/Tmain/list-roles.d/stdout-expected.txt @@ -121,6 +121,7 @@ SystemdUnit u/unit RequiredBy on referred in Required SystemdUnit u/unit Requires on referred in Requires key SystemdUnit u/unit WantedBy on referred in WantedBy key SystemdUnit u/unit Wants on referred in Wants key +TOML k/key chainElt off (EXPERIMENTAL)used as an element in a key name chain like a.b.c Terraform v/variable assigned on assigned in Variable Definitions (.tfvars) files Tex e/environment used off environment usage introduced by \begin{MyEnv} Tex i/xinput bibliography on bibliography (.bib) file @@ -264,6 +265,7 @@ SystemdUnit u/unit RequiredBy on referred in Required SystemdUnit u/unit Requires on referred in Requires key SystemdUnit u/unit WantedBy on referred in WantedBy key SystemdUnit u/unit Wants on referred in Wants key +TOML k/key chainElt off (EXPERIMENTAL)used as an element in a key name chain like a.b.c Terraform v/variable assigned on assigned in Variable Definitions (.tfvars) files Tex e/environment used off environment usage introduced by \begin{MyEnv} Tex i/xinput bibliography on bibliography (.bib) file diff --git a/Units/parser-toml.r/simple.d/args.ctags b/Units/parser-toml.r/simple.d/args.ctags new file mode 100644 index 0000000000..7af0f0730f --- /dev/null +++ b/Units/parser-toml.r/simple.d/args.ctags @@ -0,0 +1,2 @@ +--sort=no +--fields=+K{nth}{end}{line} diff --git a/Units/parser-toml.r/simple.d/expected.tags b/Units/parser-toml.r/simple.d/expected.tags new file mode 100644 index 0000000000..1af44b0f2f --- /dev/null +++ b/Units/parser-toml.r/simple.d/expected.tags @@ -0,0 +1,30 @@ +title input.toml /^title = "TOML Example"$/;" qkye line:5 +dog."tater.man" input.toml /^[dog."tater.man"]$/;" table line:7 end:10 +type.name input.toml /^type.name = "pug"$/;" qkye line:8 table:dog."tater.man" +x input.toml /^x = 1$/;" qkye line:9 table:dog."tater.man" +owner input.toml /^[owner]$/;" table line:11 end:14 +name input.toml /^name = "Tom Preston-Werner"$/;" qkye line:12 table:owner +dob input.toml /^dob = 1979-05-27T07:32:00-08:00 # First class dates$/;" qkye line:13 table:owner +database input.toml /^[database]$/;" table line:15 end:20 +server input.toml /^server = "192.168.1.1"$/;" qkye line:16 table:database +ports input.toml /^ports = [ 8001, 8001, 8002 ]$/;" qkye line:17 table:database +connection_max input.toml /^connection_max = 5000$/;" qkye line:18 table:database +enabled input.toml /^enabled = true$/;" qkye line:19 table:database +servers input.toml /^[servers]$/;" table line:21 end:23 +servers.alpha input.toml /^ [servers.alpha]$/;" table line:24 end:27 +ip input.toml /^ ip = "10.0.0.1"$/;" qkye line:25 table:servers.alpha +dc input.toml /^ dc = "eqdc10"$/;" qkye line:26 table:servers.alpha +servers.beta input.toml /^ [servers.beta]$/;" table line:28 end:31 +ip input.toml /^ ip = "10.0.0.2"$/;" qkye line:29 table:servers.beta +dc input.toml /^ dc = "eqdc10"$/;" qkye line:30 table:servers.beta +clients input.toml /^[clients]$/;" table line:32 end:40 +data input.toml /^data = [ ["gamma", "delta"], [1, 2] ]$/;" qkye line:33 table:clients +hosts input.toml /^hosts = [$/;" qkye line:36 table:clients +products input.toml /^[[products]] # 0$/;" arraytable line:41 end:44 nth:0 +name input.toml /^name = "Hammer"$/;" qkye line:42 arraytable:products +sku input.toml /^sku = 738594937$/;" qkye line:43 arraytable:products +products input.toml /^[[products]] # 1$/;" arraytable line:45 end:46 nth:1 +products input.toml /^[[products]] # 2$/;" arraytable line:47 end:50 nth:2 +name input.toml /^name = "Nail"$/;" qkye line:48 arraytable:products +sku input.toml /^sku = 284758393$/;" qkye line:49 arraytable:products +color input.toml /^color = "gray"$/;" qkye line:50 arraytable:products diff --git a/Units/parser-toml.r/simple.d/input.toml b/Units/parser-toml.r/simple.d/input.toml new file mode 100644 index 0000000000..8a5c4d1e34 --- /dev/null +++ b/Units/parser-toml.r/simple.d/input.toml @@ -0,0 +1,50 @@ +## Taken from https://toml.io/en/v0.5.0#example + +# This is a TOML document. + +title = "TOML Example" + +[dog."tater.man"] +type.name = "pug" +x = 1 + +[owner] +name = "Tom Preston-Werner" +dob = 1979-05-27T07:32:00-08:00 # First class dates + +[database] +server = "192.168.1.1" +ports = [ 8001, 8001, 8002 ] +connection_max = 5000 +enabled = true + +[servers] + + # Indentation (tabs and/or spaces) is allowed but not required + [servers.alpha] + ip = "10.0.0.1" + dc = "eqdc10" + + [servers.beta] + ip = "10.0.0.2" + dc = "eqdc10" + +[clients] +data = [ ["gamma", "delta"], [1, 2] ] + +# Line breaks are OK when inside arrays +hosts = [ + "alpha", + "omega" +] + +[[products]] # 0 +name = "Hammer" +sku = 738594937 + +[[products]] # 1 + +[[products]] # 2 +name = "Nail" +sku = 284758393 +color = "gray" diff --git a/docs/news/HEAD.rst b/docs/news/HEAD.rst index 5b44464c92..e0528f5bd2 100644 --- a/docs/news/HEAD.rst +++ b/docs/news/HEAD.rst @@ -17,6 +17,8 @@ Parser related changes New parsers ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +* TOML *peg/packcc* + Changes about parser specific kinds, roles, fields, and extras ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/main/parsers_p.h b/main/parsers_p.h index 3dfd9e8bbc..d5fb592ce7 100644 --- a/main/parsers_p.h +++ b/main/parsers_p.h @@ -43,7 +43,8 @@ VarlinkParser, \ KotlinParser, \ ThriftParser, \ - ElmParser + ElmParser, \ + TomlParser #else #define PEG_PARSER_LIST #endif diff --git a/peg/.gitignore b/peg/.gitignore index 607d396ab0..da0f02b11d 100644 --- a/peg/.gitignore +++ b/peg/.gitignore @@ -2,5 +2,6 @@ varlink.[ch] kotlin.[ch] thrift.[ch] elm.[ch] +toml.[ch] *.pego diff --git a/peg/toml.peg b/peg/toml.peg new file mode 100644 index 0000000000..88eec89f58 --- /dev/null +++ b/peg/toml.peg @@ -0,0 +1,273 @@ +# +# This file is derived from +# +# https://github.com/naoina/toml/blob/master/parse.peg ( e401e4e ) +# +######################################################################## +# +# Copyright (c) 2014 Naoya Inada +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# +########################################################################## +# +# Masatake YAMATO adapted the origina peg file to ctags. +# +########################################################################## +%prefix "ptoml" + +%auxil "struct parserCtx *" + +%earlysource { + #include "general.h" +} + +%header { + struct parserCtx; +} + +%source { +#include "toml_pre.h" +} + +TOML <- Expression (newline Expression)* newline* !. { ; } + +Expression <- ( + { ; } + / ws keyval ws comment? + / ws comment? + / ws +) + +val <- ( + { ; } + / { ; } + / { ; } + / { ; } + / { ; } + / { ; } + / { ; } +) + +ws <- [ \t]* +wsnl <- ([ \t] / newline)* + +comment <- '#' (badControl / [\t -\u10FFFF])* { ; } + +newline <- ('\r\n' / '\n') { ; } + +newlineRequired <- ( + !newline { ; } + / newline +) + +badControl <- <[\u007F\u000B\u000C\u0000-\u0008\u000E-\u001F]> { + ; +} + +# ------------------------------------------------------------------------- +# -- Tables + +table <- stdTable / arrayTable + +stdTable <- '[' ws { tableKeyStart(auxil, false, $0s); } tableKey { tableKeyEnd(auxil); } ws ']' + +arrayTable <- '[[' ws { tableKeyStart(auxil, true, $0s); } tableKey { tableKeyEnd(auxil); } ws ']]' + +keyval <- { keyvalStart(auxil, $0s); } tableKey { keyvalKeyEnd(auxil); } ws '=' ws val { keyvalValEnd(auxil); } + +key <- bareKey / quotedKey + +bareKey <- { ; } + +bareKeyChar <- badControl / [0-9A-Za-z\-_] + +quotedKey <- < '"' basicChar* '"' > { ; } + +tableKey <- tableKeyComp (tableKeySep tableKeyComp)* + +tableKeyComp <- { queueKey (auxil, $1); } + +tableKeySep <- ws '.' ws + +# ------------------------------------------------------------------------- +# -- Inline Tables + +inlineTable <- ( + '{' { ; } + ws inlineTableKeyValues? ws + '}' { ; } +) + +inlineTableKeyValues <- ( + keyval + ( + ws inlineTableCommaRequired ws + keyval + )* + ws inlineTableCommaForbidden +) + +inlineTableCommaForbidden <- ( + !',' + / ',' { ; } +) + +inlineTableCommaRequired <- ( + !',' { ; } + / ',' +) + +# ------------------------------------------------------------------------- +# -- Booleans + +boolean <- 'true' / 'false' + +# ------------------------------------------------------------------------- +# -- Numbers + +integer <- hexInt / octalInt / binaryInt / decimalInt / ([+\-] decimalInt) + +decimalInt <- [1-9] (decimalDigit / '_' decimalDigit)+ / decimalDigit +decimalDigit <- [0-9] + +hexInt <- '0x' hexDigit (hexDigit / '_' hexDigit)* +hexDigit <- [0-9A-Fa-f] + +octalInt <- '0o' octalDigit (octalDigit / '_' octalDigit)* +octalDigit <- [0-7] + +binaryInt <- '0b' binaryDigit (binaryDigit / '_' octalDigit)* +binaryDigit <- [01] + +float <- [+\-]? ('nan' / 'inf' / floatDigits) +floatDigits <- decimalInt (floatFrac floatExp? / floatFrac? floatExp) +floatFrac <- '.' decimalDigit (decimalDigit / '_' decimalDigit)* +floatExp <- [eE] [\-+]? decimalDigit (decimalDigit / '_' decimalDigit)* + +# ------------------------------------------------------------------------- +# -- Escape Sequences + +escaped <- escape ([btnfr"/\\] / 'u' hexQuad / 'U' hexQuad hexQuad) +escape <- '\\' + +hexQuad <- hexDigit hexDigit hexDigit hexDigit + +# ------------------------------------------------------------------------- +# -- Strings + +string <- ( + mlLiteralString + / literalString + / mlBasicString + / basicString +) + +basicString <- <'"' basicChar* '"'> { ; } + +basicChar <- badControl / basicUnescaped / escaped + +# This is basically the full printable range, excluding " and \ +basicUnescaped <- [\t -!#-\[\]-\u10FFFF] + +mlBasicString <- '"""' mlBasicBody '"""' { ; } + +mlBasicBody <- ( + mlBasicBodyChar* + mlBasicBodyEndQuotes? # needed for strings like """str""""" +) + +mlBasicBodyChar <- ( + !'"""' '"' { ; } + / { ; } + / escape newline wsnl +) +mlBasicBodyEndQuotes <- ( + ('""' &'"""') { ; } + / ('"' &'"""') { ; } +) + +literalString <- "'" "'" { ; } + +literalChar <- badControl / [\t -&(-\u10FFFF] + +mlLiteralString <- ( + "'''" + { ; } + "'''" +) + +mlLiteralBody <- ( + (!"'''" (mlLiteralChar / newline))* + mlLiteralBodyEndQuotes? # needed for '''str''''' +) + +mlLiteralChar <- badControl / [\t -\u10FFFF] +mlLiteralBodyEndQuotes <- ("''" &"'''") / ("'" &"'''") + +# ------------------------------------------------------------------------- +# -- Datetimes + +datetime <- (fullDate ([tT ] fullTime)?) / partialTime + +partialTime <- timeHour ':' timeMinute ':' timeSecond timeSecfrac? + +fullDate <- dateFullYear '-' dateMonth '-' dateMDay +fullTime <- partialTime timeOffset? + +dateFullYear <- digitQuad +dateMonth <- digitDual +dateMDay <- digitDual +timeHour <- digitDual +timeMinute <- digitDual +timeSecond <- digitDual +timeSecfrac <- '.' decimalDigit+ +timeNumoffset <- [\-+] timeHour ':' timeMinute +timeOffset <- [zZ] / timeNumoffset + +digitDual <- decimalDigit decimalDigit +digitQuad <- digitDual digitDual + +# ------------------------------------------------------------------------- +# -- Arrays + +array <- ( + '[' { ; } + wsnl arrayValues? wsnl + ']' +) + +arrayValues <- ( + (wsnl comment)* wsnl + val { ; } + ( + (wsnl comment)* wsnl + arraySep + (wsnl comment)* wsnl + val { ; } + )* + (wsnl comment)* wsnl + arraySep? + (wsnl comment)* +) + +arraySep <- ',' + +%% +#include "toml_post.h" diff --git a/peg/toml_post.h b/peg/toml_post.h new file mode 100644 index 0000000000..0fae3fba06 --- /dev/null +++ b/peg/toml_post.h @@ -0,0 +1,229 @@ +/* + * Copyright (c) 2022 Masatake YAMATO + * Copyright (c) 2022 Red Hat, Inc. + * + * This source code is released for free distribution under the terms of the + * GNU General Public License version 2 or (at your option) any later version. + * + * This module contains functions to generate tags for TOML. + */ + + +/* +* INCLUDE FILES +*/ +#include "options.h" +#include "parse.h" +#include "routines.h" + +/* +* FUNCTION DEFINITIONS +*/ +static void markTableEnd (struct parserCtx *auxil, long offset) +{ + tagEntryInfo *e = getEntryInCorkQueue (auxil->lastTableIndex); + if (!e) + return; + + unsigned long lineNumber = (offset == -1) + ? getInputLineNumber() + : getInputLineNumberForFileOffset (offset); + + setTagEndLine(e, ((offset != -1 && lineNumber > 1) + ? lineNumber - 1 + : lineNumber)); + + auxil->lastTableIndex = CORK_NIL; + for (unsigned int i = uintArrayLast (auxil->unwind_depths); i > 0; i--) + POP_SCOPE (auxil); + uintArrayRemoveLast (auxil->unwind_depths); +} + +static vString *makeVStringFromKeyQueue (ptrArray *keyQueue) +{ + vString *vname = vStringNew (); + + for (size_t i = 0; i < ptrArrayCount (keyQueue); i++) + { + const char *key = ptrArrayItem (keyQueue, i); + vStringCatS (vname, key); + if (i != ptrArrayCount (keyQueue) - 1) + vStringPut (vname, '.'); + } + + return vname; +} + +static void makeTagsForKeys (struct parserCtx *auxil, unsigned long lineNumber, MIOPos filePosition, + int last_key_index0) +{ + int last_key_index = last_key_index0; + for (size_t i = 0; i < ptrArrayCount (auxil->keyQueue); i++) + { + tagEntryInfo e; + const char *key = ptrArrayItem (auxil->keyQueue, i); + if (i == ptrArrayCount (auxil->keyQueue) - 1) + initTagEntry (&e, key, K_KEY); + else + initRefTagEntry (&e, key, K_KEY, R_KEY_CHAINELT); + e.lineNumber = lineNumber; + e.filePosition = filePosition; + e.extensionFields.scopeIndex = last_key_index; + if (i == ptrArrayCount (auxil->keyQueue) - 1) + ;/* TODO: Attach partOf:vStringValue(vname) */ + last_key_index= makeTagEntry (&e); + if (i == ptrArrayCount (auxil->keyQueue) - 1) + { + SET_SCOPE(auxil, last_key_index); + uintArrayAdd (auxil->unwind_depths, ptrArrayCount (auxil->keyQueue)); + } + } +} + +static void tableKeyStart (struct parserCtx *auxil, bool isArrayTable, long offset) +{ + if (auxil->keyQueue == NULL) + auxil->keyQueue = ptrArrayNew (eFree); + auxil->isArrayTable = isArrayTable; + auxil->keyOffset = offset; + + if (auxil->lastTableIndex != CORK_NIL) + markTableEnd (auxil, offset); +} + +static void tableKeyEnd (struct parserCtx *auxil) +{ + tagEntryInfo e; + unsigned long lineNumber = getInputLineNumberForFileOffset(auxil->keyOffset); + MIOPos filePosition = getInputFilePositionForLine (lineNumber); + + vString *vname = makeVStringFromKeyQueue (auxil->keyQueue); + const char *name = vStringValue (vname); + + initTagEntry (&e, name, auxil->isArrayTable? K_ARRAYTABLE: K_TABLE); + e.lineNumber = lineNumber; + e.filePosition = filePosition; + + if (auxil->isArrayTable) + { + if (hashTableHasItem (auxil->arrayTableCounters, name)) + { + void *tmp = hashTableGetItem (auxil->arrayTableCounters, name); + int num = HT_PTR_TO_INT(tmp); + e.extensionFields.nth = num; + num++; + hashTableUpdateItem (auxil->arrayTableCounters, name, HT_INT_TO_PTR(num)); + } + else + { + e.extensionFields.nth = 0; + char *key = eStrdup (name); + hashTablePutItem (auxil->arrayTableCounters, key, HT_INT_TO_PTR(1)); + } + } + + int table_index = makeTagEntry (&e); + auxil->lastTableIndex = table_index; + + makeTagsForKeys (auxil, lineNumber, filePosition, CORK_NIL); + ptrArrayClear (auxil->keyQueue); + + vStringDelete (vname); /* NULL is acceptable. */ +} + +static void keyvalStart (struct parserCtx *auxil, long offset) +{ + if (auxil->keyQueue == NULL) + auxil->keyQueue = ptrArrayNew (eFree); + auxil->isArrayTable = false; + auxil->keyOffset = offset; +} + +static void keyvalKeyEnd (struct parserCtx *auxil) +{ + tagEntryInfo e; + unsigned long lineNumber = getInputLineNumberForFileOffset(auxil->keyOffset); + MIOPos filePosition = getInputFilePositionForLine (lineNumber); + + vString *vname = makeVStringFromKeyQueue (auxil->keyQueue); + const char *name = vStringValue (vname); + + initTagEntry (&e, name, K_QKEY); + e.lineNumber = lineNumber; + e.filePosition = filePosition; + e.extensionFields.scopeIndex = auxil->lastTableIndex; + makeTagEntry (&e); + + makeTagsForKeys (auxil, lineNumber, filePosition, BASE_SCOPE(auxil)); + ptrArrayClear (auxil->keyQueue); + + vStringDelete (vname); /* NULL is acceptable. */ +} + +static void keyvalValEnd (struct parserCtx *auxil) +{ + for (unsigned int i = uintArrayLast (auxil->unwind_depths); i > 0; i--) + POP_SCOPE (auxil); + uintArrayRemoveLast (auxil->unwind_depths); +} + +static void queueKey (struct parserCtx *auxil, const char *name) +{ + if (auxil->keyQueue) + { + char *key = eStrdup (name); + ptrArrayAdd (auxil->keyQueue, key); + } +} + +static void ctxInit (struct parserCtx *auxil) +{ + BASE_INIT(auxil, KIND_GHOST_INDEX); + auxil->keyQueue = NULL; + auxil->lastTableIndex = CORK_NIL; + auxil->arrayTableCounters = hashTableNew (7, + hashCstrhash, + hashCstreq, + eFree, + NULL); + auxil->unwind_depths = uintArrayNew (); +} + +static void ctxFini (struct parserCtx *auxil) +{ + if (auxil->lastTableIndex != CORK_NIL) + markTableEnd (auxil, -1); + + BASE_FINI(auxil); + if (auxil->keyQueue) + ptrArrayDelete (auxil->keyQueue); + uintArrayDelete (auxil->unwind_depths); +} + +static void findTomlTags (void) +{ + struct parserCtx auxil; + + ctxInit (&auxil); + ptoml_context_t *pctx = ptoml_create(&auxil); + + while (ptoml_parse(pctx, NULL) && (!BASE_ERROR(&auxil)) ); + + ptoml_destroy(pctx); + while (getcFromInputFile() != EOF); + ctxFini (&auxil); +} + +extern parserDefinition* TomlParser (void) +{ + static const char *const extensions [] = { "toml", NULL }; + parserDefinition* def = parserNew ("TOML"); + def->kindTable = TomlKinds; + def->kindCount = ARRAY_SIZE (TomlKinds); + def->extensions = extensions; + def->parser = findTomlTags; + def->useCork = true; + def->enabled = true; + def->requestAutomaticFQTag = false; + return def; +} diff --git a/peg/toml_pre.h b/peg/toml_pre.h new file mode 100644 index 0000000000..a559cfb3c7 --- /dev/null +++ b/peg/toml_pre.h @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2022 Masatake YAMATO + * Copyright (c) 2022 Red Hat, Inc. + * + * This source code is released for free distribution under the terms of the + * GNU General Public License version 2 or (at your option) any later version. + * + * This module contains macros, data decls and prototypes to generate tags for TOML. + */ + +/* +* INCLUDE FILES +*/ +#include "kind.h" +#include "peg_common.h" + +#include "htable.h" +#include "ptrarray.h" + +/* +* MACROS +*/ + +/* +* DATA DECLARATIONS +*/ +typedef enum { + K_KEY, + K_TABLE, + K_ARRAYTABLE, + K_QKEY, +} tomlKind; + +typedef enum { + R_KEY_CHAINELT, +} tomlKeyRole; + +static roleDefinition TomlKeyRoles [] = { + { false, "chainElt", "(EXPERIMENTAL)used as an element in a key name chain like a.b.c" }, +}; + +static kindDefinition TomlKinds [] = { + { false, 'k', "key", "keys", + .referenceOnly = false, ATTACH_ROLES(TomlKeyRoles) }, + { true, 't', "table", "tables" }, + { true, 'a', "arraytable", "array tables" }, + { true, 'K', "qkye", "qualified keys" }, +}; + +struct parserCtx { + struct parserBaseCtx base; + ptrArray *keyQueue; + bool isArrayTable; + long keyOffset; + int lastTableIndex; + hashTable *arrayTableCounters; + uintArray *unwind_depths; +}; + +/* +* FUNCTION PROTOTYPES +*/ +static void tableKeyStart (struct parserCtx *auxil, bool isArrayTable, long offset); +static void tableKeyEnd (struct parserCtx *auxil); +static void keyvalStart (struct parserCtx *auxil, long offset); +static void keyvalKeyEnd (struct parserCtx *auxil); +static void keyvalValEnd (struct parserCtx *auxil); +static void queueKey (struct parserCtx *auxil, const char *name); diff --git a/source.mak b/source.mak index 4dcc5c173d..0d389e9d0f 100644 --- a/source.mak +++ b/source.mak @@ -268,6 +268,7 @@ PEG_INPUT = \ peg/kotlin.peg \ peg/thrift.peg \ peg/elm.peg \ + peg/toml.peg \ \ $(NULL) PEG_SRCS = $(PEG_INPUT:.peg=.c) diff --git a/win32/peg_rule.mak b/win32/peg_rule.mak index df06c900a1..f369846f72 100644 --- a/win32/peg_rule.mak +++ b/win32/peg_rule.mak @@ -3,3 +3,4 @@ peg/varlink.c peg/varlink.h: peg/varlink.peg $(PACKCC) peg/kotlin.c peg/kotlin.h: peg/kotlin.peg $(PACKCC) peg/thrift.c peg/thrift.h: peg/thrift.peg $(PACKCC) peg/elm.c peg/elm.h: peg/elm.peg $(PACKCC) +peg/toml.c peg/toml.h: peg/toml.peg $(PACKCC)