Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6199049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:07:18+00:00 2026-05-24T04:07:18+00:00

all! I’m trying to compile a program using PowerShell, but the command is being

  • 0

all! I’m trying to compile a program using PowerShell, but the command is being parsed strangely.
This command executes correctly in cmd.exe:

dmd -od"bin" -of"bin\convHull.exe" -I"src" "src\concSort.d" "src\fileParser.d" "src\main.d" "src\pointLogic.d" "src\quickHull.d" "src\stupidHull.d" -D -O -release

But PowerShell executes it as: (blue, navy, purple texts as they appear in PowerShell ISE)

dmd -od”bin” -of”bin\convHull.exe” -I”src” “src\concSort.d” “src\fileParser.d” “src\main.d” “src\pointLogic.d” “src\quickHull.d” “src\stupidHull.d” -D -O -release

This spits the following error:

The string starting:
At line:1 char:147
+ dmd -od"bin" -of"bin\convHull.exe" -I"src" "src\concSort.d" "src\fileParser.d" "src\main.d"     
"src\pointLogic.d" "src\quickHull.d" "src\stupidHull.d <<<< " -D -O -release
is missing the terminator: ".
At line:1 char:163

So it seems to be interpreting a period as a quote. This is peculiar. Has anyone else had this problem with PowerShell?

Things I’ve tried:

  1. escaping quotes
  2. making sure all quotes are “straight quotes” and not angled
  3. putting a space before quotes (parses correctly, but the program doesn’t understand the arguments.)

Thanks,
Charles.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T04:07:19+00:00Added an answer on May 24, 2026 at 4:07 am

    I believe this should do the trick (newlines added for clarity only, and removal of extra quotes):

    dmd '-od"bin"' '-of"bin\convHull.exe"' '-I"src"'
        src\concSort.d src\fileParser.d src\main.d src\pointLogic.d src\quickHull.d src\stupidHull.d
        -D -O -release
    

    Note that in the case where a quote (“) is to be passed as part of the argument itself, I surrounded the entire argument with single quotes (‘). From the experimentation below it can be seen that only -of"..." needs the quotes about it.

    Happy coding.


    I can’t find a good reference on this exact production, however note the following parsings:

    -x"w."   ->  error: " expected (last " is special)
    -x"w.""  ->  -x"w and ."" (the . starts a new token and the " in that starts
                               a quote; however, the quotes are not removed)
    '-x"w."' ->  -x"w." (extra quote fine, neither special)
    -x"w"    ->  -x"w"  (no . and " not special)
    -x"w""   ->  -x"w"" (no . and " not special)
    a".b"    ->  a.b    (didn't start with `-`, quotes removed)
    a".b     ->  error: " expected (" is special)

    So it does indeed appear to have something to do with the . and - combination (and it might not be exclusive). From the above I believe that a token starting with - does not include the . character as a valid character in the token so the lexer terminates said token and starts a new token — easily provable with a good EBNF reference, which I don’t have.


    The best I can find is Appendix C: The PowerShell Grammar:

    The ParameterToken rule is used to match cmdlet parameters such as -foo or –
    boolProp: . Note that this rule will also match –foobar, so this rule has
    to be checked before the –token rule.

    <ParameterToken> = -[:letter:]+[:]{0 |1}
    

    However, this is incomplete at best and does not even include a definition of “letter”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All this might look too trivial but read it through - I have simple
all, I am trying to multiply a matrix to a vector in OpenGL, but
All, Why does the following code fail to compile for 'std::endl', but it's fine
All I know about the constraint is it's name ( SYS_C003415 ), but I
All I want is to update an ListViewItem's text whithout seeing any flickering. This
all: this is quoted from Effective C++ 3rd editiion const_cast is typically used to
All I get is this: An error has occurred in the script on this
All I need to do is have a form that does this: User enters
All the examples of Silverlight using MVVM use interface named IPropertyChanged. What is the
All, I'm using the JSON Perl module to encode JSON. I'd like the resulting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.