Line numbers now properly counted when there are comments.

Before, yyloc->lines() not called on newlines in comments. This resulted
in syntax errors to be reported at the wrong lines if files contained
comments.

Change-Id: I196142f30e2f6a98d480c4c866ba974066184c65
1 file changed
tree: e983b3bbb8aba5e089b222f3c81fba265754d85e
  1. c2hal/
  2. test/
  3. Android.mk
  4. Annotation.cpp
  5. Annotation.h
  6. ArrayType.cpp
  7. ArrayType.h
  8. AST.cpp
  9. AST.h
  10. CompoundType.cpp
  11. CompoundType.h
  12. ConstantExpression.cpp
  13. ConstantExpression.h
  14. Coordinator.cpp
  15. Coordinator.h
  16. EnumType.cpp
  17. EnumType.h
  18. Formatter.cpp
  19. Formatter.h
  20. FQName.cpp
  21. FQName.h
  22. generateCpp.cpp
  23. generateJava.cpp
  24. generateVts.cpp
  25. GenericBinder.cpp
  26. GenericBinder.h
  27. HandleType.cpp
  28. HandleType.h
  29. hidl-gen_l.ll
  30. hidl-gen_y.yy
  31. Interface.cpp
  32. Interface.h
  33. main.cpp
  34. Method.cpp
  35. Method.h
  36. MODULE_LICENSE_APACHE2
  37. NamedType.cpp
  38. NamedType.h
  39. NOTICE
  40. PredefinedType.cpp
  41. PredefinedType.h
  42. README.md
  43. ScalarType.cpp
  44. ScalarType.h
  45. Scope.cpp
  46. Scope.h
  47. StringType.cpp
  48. StringType.h
  49. Type.cpp
  50. Type.h
  51. TypeDef.cpp
  52. TypeDef.h
  53. VectorType.cpp
  54. VectorType.h
README.md

hidl-gen user guide

1. Build

croot
make hidl-gen

2. Run

hidl-gen -o output-path -L language (-r interface-root) fqname

output-path: directory to store the output files.
language: output file for given language. e.g.c++, vts..

fqname: fully qualified name of the input files.
For singe file input, follow the format: package@version::fileName
For directory input, follow the format: package@version

interface-root(optional): prefix and root path for fqname.
If not set, use the default prefix: android.hardware and default root path
defined in $TOP.

examples:

hidl-gen -o output -L c++ android.hardware.nfc@1.0::INfc.hal
hidl-gen -o output -L vts android.hardware.nfc@1.0
hidl-gen -o test -L c++ -r android.hardware:/home/android/master/hardware/interfaces android.hardware.nfc@1.0