All these errors running basic Pegged helloworld example.
Enjoys Math via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Sep 26 23:30:35 PDT 2015
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
_D6pegged7dynamic7grammar7grammarFAyaHAyaDFS6pegged3peg9ParseTreeZS6pegged3peg9ParseTreeZS6pegged7dynamic7grammar14DynamicGrammar (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\
The # of errors was greatly reduced when I added the 3 pegged
source files to my project. What can be going wrong? Thanks!
More information about the Digitalmars-d-learn
mailing list