digitalmars.D.learn - All these errors running basic Pegged helloworld example.
- Enjoys Math (27/27) Sep 26 2015 The example is:
- BBasile (17/44) Sep 27 2015 You must also pass the source root with -I:
- Enjoys Math (3/54) Jan 11 2019 Thanks, I downloaded Coedit, but it's not working with pegged
- 0xEAB (7/9) Jan 11 2019 According to your post in [0], it didn't work because you had a
- Michelle Long (4/31) Jan 11 2019 You need to add most of the pegged files... there are more than
- Enjoys Math (3/8) Jan 11 2019 Why should I do that? There's a DUB feature in Coedit... it
- Steven Schveighoffer (3/12) Jan 11 2019 Just keep in mind folks, that the post replied to was from September 201...
The example is: import pegged.grammar; mixin(grammar(` Arithmetic: Term < Factor (Add / Sub)* Add < "+" Factor Sub < "-" Factor Factor < Primary (Mul / Div)* Mul < "*" Primary Div < "/" Primary Primary < Parens / Neg / Pos / Number / Variable Parens < "(" Term ")" Neg < "-" Primary Pos < "+" Primary Number < ~([0-9]+) Variable <- identifier `)); I'm using Visual D and have C:\MyProjects\D\Pegged (the git clone of pegged) added to the add'l imports field under project properties > compiler. I'm getting errors like these: Error 1 Error 42: Symbol Undefined _D6pegged7dynamic7grammar7grammarFAyaHAyaDFS6pegged3peg9ParseTreeZS6pegged3peg9ParseTreeZS6pegged7dynamic7gra mar14DynamicGrammar (pegged.dynamic.grammar.DynamicGrammar pegged.dynamic.grammar.grammar(immutable(char)[], pegged.peg.ParseTree delegate(pegged.peg.ParseTree)[immutable(char)[]])) C:\MyProjects\D\PeggedPractice\ Error 2 Error 42: Symbol Undefined _D6pegged7dynamic7grammar12__ModuleInfoZ C:\MyProjects\D\PeggedPractice\ source files to my project. What can be going wrong? Thanks!
Sep 26 2015
On Sunday, 27 September 2015 at 06:30:37 UTC, Enjoys Math wrote:The example is: import pegged.grammar; mixin(grammar(` Arithmetic: Term < Factor (Add / Sub)* Add < "+" Factor Sub < "-" Factor Factor < Primary (Mul / Div)* Mul < "*" Primary Div < "/" Primary Primary < Parens / Neg / Pos / Number / Variable Parens < "(" Term ")" Neg < "-" Primary Pos < "+" Primary Number < ~([0-9]+) Variable <- identifier `)); I'm using Visual D and have C:\MyProjects\D\Pegged (the git clone of pegged) added to the add'l imports field under project properties > compiler. I'm getting errors like these: Error 1 Error 42: Symbol Undefined _D6pegged7dynamic7grammar7grammarFAyaHAyaDFS6pegged3peg9ParseTreeZS6pegged3peg9ParseTreeZS6pegged7dynamic7gra mar14DynamicGrammar (pegged.dynamic.grammar.DynamicGrammar pegged.dynamic.grammar.grammar(immutable(char)[], pegged.peg.ParseTree delegate(pegged.peg.ParseTree)[immutable(char)[]])) C:\MyProjects\D\PeggedPractice\ Error 2 Error 42: Symbol Undefined _D6pegged7dynamic7grammar12__ModuleInfoZ C:\MyProjects\D\PeggedPractice\ source files to my project. What can be going wrong? Thanks!You must also pass the source root with -I: -IC:\MyProjects\D\Pegged (and maybe you miss another source since there are 5: '..\repos\Pegged\pegged\grammar.d' '..\repos\Pegged\pegged\parser.d' '..\repos\Pegged\pegged\peg.d' '..\repos\Pegged\pegged\dynamic\grammar.d' '..\repos\Pegged\pegged\dynamic\peg.d' ) By the way with Coedit you wouldn't have this kind of problems (Pegged is part of metaD). You can even run some test on Pegged without saving the file / without a project (this is called a runnable module). This is just what I've done. At least compile pegged as a static lib, then it's simpler, you just have to pass the -I<root> pegged.lib and your custom sources files.
Sep 27 2015
On Sunday, 27 September 2015 at 07:16:51 UTC, BBasile wrote:On Sunday, 27 September 2015 at 06:30:37 UTC, Enjoys Math wrote:Thanks, I downloaded Coedit, but it's not working with pegged (using the library manager dub button)The example is: import pegged.grammar; mixin(grammar(` Arithmetic: Term < Factor (Add / Sub)* Add < "+" Factor Sub < "-" Factor Factor < Primary (Mul / Div)* Mul < "*" Primary Div < "/" Primary Primary < Parens / Neg / Pos / Number / Variable Parens < "(" Term ")" Neg < "-" Primary Pos < "+" Primary Number < ~([0-9]+) Variable <- identifier `)); I'm using Visual D and have C:\MyProjects\D\Pegged (the git clone of pegged) added to the add'l imports field under project properties > compiler. I'm getting errors like these: Error 1 Error 42: Symbol Undefined _D6pegged7dynamic7grammar7grammarFAyaHAyaDFS6pegged3peg9ParseTreeZS6pegged3peg9ParseTreeZS6pegged7dynamic7gra mar14DynamicGrammar (pegged.dynamic.grammar.DynamicGrammar pegged.dynamic.grammar.grammar(immutable(char)[], pegged.peg.ParseTree delegate(pegged.peg.ParseTree)[immutable(char)[]])) C:\MyProjects\D\PeggedPractice\ Error 2 Error 42: Symbol Undefined _D6pegged7dynamic7grammar12__ModuleInfoZ C:\MyProjects\D\PeggedPractice\ source files to my project. What can be going wrong? Thanks!You must also pass the source root with -I: -IC:\MyProjects\D\Pegged (and maybe you miss another source since there are 5: '..\repos\Pegged\pegged\grammar.d' '..\repos\Pegged\pegged\parser.d' '..\repos\Pegged\pegged\peg.d' '..\repos\Pegged\pegged\dynamic\grammar.d' '..\repos\Pegged\pegged\dynamic\peg.d' ) By the way with Coedit you wouldn't have this kind of problems (Pegged is part of metaD). You can even run some test on Pegged without saving the file / without a project (this is called a runnable module). This is just what I've done. At least compile pegged as a static lib, then it's simpler, you just have to pass the -I<root> pegged.lib and your custom sources files.
Jan 11 2019
On Friday, 11 January 2019 at 17:35:40 UTC, Enjoys Math wrote:Thanks, I downloaded Coedit, but it's not working with pegged (using the library manager dub button)According to your post in [0], it didn't work because you had a typo in `pegged`. Maybe correct it and try again :) - Elias [0] https://forum.dlang.org/thread/yhftsrkylskbigoanzlb forum.dlang.org
Jan 11 2019
On Sunday, 27 September 2015 at 06:30:37 UTC, Enjoys Math wrote:The example is: import pegged.grammar; mixin(grammar(` Arithmetic: Term < Factor (Add / Sub)* Add < "+" Factor Sub < "-" Factor Factor < Primary (Mul / Div)* Mul < "*" Primary Div < "/" Primary Primary < Parens / Neg / Pos / Number / Variable Parens < "(" Term ")" Neg < "-" Primary Pos < "+" Primary Number < ~([0-9]+) Variable <- identifier `)); I'm using Visual D and have C:\MyProjects\D\Pegged (the git clone of pegged) added to the add'l imports field under project properties > compiler. I'm getting errors like these: Error 1 Error 42: Symbol Undefined _D6pegged7dynamic7grammar7grammarFAyaHAyaDFS6pegged3peg9ParseTreeZS6pegged3peg9ParseTreeZS6pegged7dynamic7gra mar14DynamicGrammar (pegged.dynamic.grammar.DynamicGrammar pegged.dynamic.grammar.grammar(immutable(char)[], pegged.peg.ParseTree delegate(pegged.peg.ParseTree)[immutable(char)[]])) C:\MyProjects\D\PeggedPractice\ Error 2 Error 42: Symbol Undefined _D6pegged7dynamic7grammar12__ModuleInfoZ C:\MyProjects\D\PeggedPractice\ source files to my project. What can be going wrong? Thanks!You need to add most of the pegged files... there are more than 3. Try adding them all first then remove the junk like the examples, docs, etc until it works.
Jan 11 2019
On Friday, 11 January 2019 at 17:44:33 UTC, Michelle Long wrote:On Sunday, 27 September 2015 at 06:30:37 UTC, Enjoys Math wrote:Why should I do that? There's a DUB feature in Coedit... it should work![...]You need to add most of the pegged files... there are more than 3. Try adding them all first then remove the junk like the examples, docs, etc until it works.
Jan 11 2019
On 1/11/19 1:21 PM, Enjoys Math wrote:On Friday, 11 January 2019 at 17:44:33 UTC, Michelle Long wrote:Just keep in mind folks, that the post replied to was from September 2015. -SteveOn Sunday, 27 September 2015 at 06:30:37 UTC, Enjoys Math wrote:Why should I do that? There's a DUB feature in Coedit... it should work![...]You need to add most of the pegged files... there are more than 3. Try adding them all first then remove the junk like the examples, docs, etc until it works.
Jan 11 2019