Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate scanner from parser. #67 #74

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

schwehr
Copy link
Contributor

@schwehr schwehr commented Aug 10, 2018

  • flex and bison now generate scanner.h and parser.h respectively
  • _restartScanner and _isTime are no longer static
  • Added utGetYyCBufP() to pass yy_c_buf_p
  • #if'ed out ut_add_name_prefix in prefix as there are two header definitions

This is in preparation for removing the include of scanner.c from
parser.c for Unidata#67
- flex and bison now generate scanner.h and parser.h respectively
- _restartScanner and _isTime are no longer static
- Added utGetYyCBufP() to pass yy_c_buf_p
- #if'ed out ut_add_name_prefix in prefix as there are two header definitions
@schwehr
Copy link
Contributor Author

schwehr commented Aug 10, 2018

Sigh... Travis-CI isn't being particularly helpful at the moment.

The command "sudo apt-get install cmake libcunit1-dev libexpat-dev texinfo" failed and exited with 100 during .

@schwehr
Copy link
Contributor Author

schwehr commented Aug 10, 2018

/bin/bash ../libtool  --tag=CC   --mode=link gcc  -g -O2   -o udunits2 udunits2.o ../lib/libudunits2.la -ldl -lexpat -lm 
libtool: link: gcc -g -O2 -o .libs/udunits2 udunits2.o  ../lib/.libs/libudunits2.so -ldl /usr/lib/x86_64-linux-gnu/libexpat.so -lm
../lib/.libs/libudunits2.so: undefined reference to `ut_delete_buffer'
../lib/.libs/libudunits2.so: undefined reference to `utGetYyCBufP'
../lib/.libs/libudunits2.so: undefined reference to `ut_scan_string'
../lib/.libs/libudunits2.so: undefined reference to `utlex'

Next up is to log the flex and bison versions.

@schwehr
Copy link
Contributor Author

schwehr commented Aug 10, 2018

flex --version
flex 2.5.35
bison --version
bison (GNU Bison) 3.0.2

Oh... autoconf and configure. I've been doing

rm -f lib/{scanner,parser}.{c,h}; rm -rf build-ninja/ ; time (mkdir -p build-ninja && cd build-ninja && cmake -GNinja .. && cmake --build . && ctest .); perl -pi -e 's/\s+\n/\n/g' lib/{scanner,parser}.[ch]

@schwehr
Copy link
Contributor Author

schwehr commented Aug 10, 2018

I will do a separate pull request to add checking the cmake build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant