Fixed bug in state tagging. Updated examples to use concatinated preprocessor strings
This commit is contained in:
@@ -67,12 +67,10 @@ void test_language(void) {
|
||||
Maths = mpc_new("maths");
|
||||
|
||||
mpca_lang(MPCA_LANG_DEFAULT,
|
||||
" \
|
||||
expression : <product> (('+' | '-') <product>)*; \
|
||||
product : <value> (('*' | '/') <value>)*; \
|
||||
value : /[0-9]+/ | '(' <expression> ')'; \
|
||||
maths : /^/ <expression> /$/; \
|
||||
",
|
||||
" expression : <product> (('+' | '-') <product>)*; "
|
||||
" product : <value> (('*' | '/') <value>)*; "
|
||||
" value : /[0-9]+/ | '(' <expression> ')'; "
|
||||
" maths : /^/ <expression> /$/; ",
|
||||
Expr, Prod, Value, Maths);
|
||||
|
||||
mpc_cleanup(4, Expr, Prod, Value, Maths);
|
||||
|
Reference in New Issue
Block a user