Token-Level Adversarial Prompt Detection Based on Perplexity Measures and Contextual Information