0

The cup arg: -destdir does not work. With or without this option, the generated source files (parser and symbols) always in the top folder (build/generated-src/cup).

For example as below, the expected destination folder is 'build/generated-src/cup/my/pkg' but actually it's still 'build/generated-src/cup'.

cup {
   args = ["-destdir", "build/generated-src/cup/my/pkg", "-parser", "my_parser", "-symbols", "my_sym"]
}

The questions are:

  1. How can I get the generated class in the right folder that matching the package name?

  2. Is there a workaround to move the generated files by using a gradle task?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Zhen
  • 11

1 Answers1

0

This issue is resolved by putting the cup source file into the folder that matching the package name like src/main/cup/my/pkg/parser.cup.

Do not put the cup source file under the top folder such as src/main/cup/parser.cup.

Zhen
  • 11