ValidateSyntaxFromTextFile

  • Descriptions:
    Validate syntax of lexical records from a text file. No auto-fixed file is generated. The result shows error message if no error found.

  • Requirements:
    • lexCheck${YEAR}api.jar

  • Usage:
    shell>ValidateSyntaxFromTextFile <inFile> <-v> <prepostionFile>
    • inFile: lexical file in text format
    • -v: set verbose to true, default: fault
    • prepositionFile: the preposition file
      default: use the prepositions.data included in the lexCheck${YEAR}api.jar or lexCheck${YEAR}dist.jar
      => prepositions are used in the class of Compl.CheckPreposition.java If this file is not found (empty file name or no such file exists), the default file of prepositions.data in the jar file is used. Due to the design of abstract class of CheckFormat.java, this file can't be passing through as a parameter. However, the file can be stored in GlobalVars class if needed.

  • Outputs:
    Confirmed message if records are valid. Otherwise, error message.

  • Examples:
    • shell> ValidateSyntaxFromTextFile ./in.txt
    • shell> ValidateSyntaxFromTextFile ./in.txt -v
    • shell> ValidateSyntaxFromTextFile ./in.txt -v ./data/Files/prepositions.data