Syntax checking is the verification that a program's source code is technically correct according to the rules of that programming language.
Questions tagged [syntax-checking]
110 questions
3
votes
1 answer
Why doesn't 'haml --check' find this glaring syntax error
I was looking for rake tasks that would help me track down syntax errors, and I came across haml --check as a possible solution for double checking haml files. Unfortunately, when I passed it this broken example, haml says the syntax is OK.
Have I…

Philip C
- 691
- 7
- 18
3
votes
3 answers
Syntax / Logical checker In Javascript?
I'm building a solution for a client which allows them to create very basic code,
now i've done some basic syntax validation but I'm stuck at variable verification.
I know JSLint does this using Javascript and i was wondering if anyone knew of a…

TheBritishAreComing
- 1,667
- 2
- 19
- 38
3
votes
0 answers
How to enable Twig syntax for HTML/PHP files in PhpStorm?
I'm having trouble getting Twig syntax checking and highlighting for *.php and *.tpl* files in PhpStorm? It throws a lot of syntax errors. The HTML and PHP syntax is already getting picked up.
In Settings | File Types | Twig, I can't add filetype…

Bas Peeters
- 3,269
- 4
- 33
- 49
3
votes
1 answer
Difference between stopping after compiling and checking for syntax only
When using gcc or g++, what is the difference between telling GCC to only compile a file and not link (-S), combined with telling it to not produce an output file (-o "nul"):
gcc.exe/g++.exe -S "filename" -o "nul"
... and telling it to check syntax…

Orwell
- 1,468
- 1
- 13
- 28
3
votes
1 answer
Why aren't both versions of this code failing the -c Perl check?
The new method of Parse::RecDescent has this prototype:
sub new ($$$)
{
# code goes here
}
and if I create an object like this:
my $parser = Parse::RecDescent->new($grammar);
it will create a parser, and the method will receive 2 parameters…

Geo
- 93,257
- 117
- 344
- 520
3
votes
2 answers
Does anyone know of a syntax checker for classic ASP?
As part of my my web development system I have written a text editor witch (among other formats like CSS and HTML) has got ASP syntax highlighting.
Does anyone know of an ASP syntax checker program of (preferably) DLL that I could call from within…

Edelcom
- 5,038
- 8
- 44
- 61
3
votes
1 answer
Command line syntax checker for Racket / Scheme
I'm looking for a command-line tool to check the syntax of my Racket / PLT-Scheme code. The purpose of this is to build a syntax-checker for Syntastic Vim plugin.
Has anybody heard of a way?

Ory Band
- 14,716
- 14
- 59
- 66
2
votes
2 answers
How can I add a project specific @INC module-path to Komodo without breaking syntax checking?
For a Perl porting project I am using ActiveState's Komodo IDE 5.1
For external reasons, the xyz.pm modules reside in a different directory tree.
By adding a PERL5LIB=<> under the "environemt" tab of the debu/run dialog, I can show Komodo/Perl how…

lexu
- 8,766
- 5
- 45
- 63
2
votes
3 answers
JavaScript syntax check with JavaScript?
How could a Commando like me check if inputed code is a valid JavaScript source using some JavaScript built-in methods (if any!) or in any other possible way!? (Something like a preparser found in various IDE's like NetBeans, Eclipse, etc)?
I have…
user798596
2
votes
6 answers
php compiler or syntax checker
I'm looking for a php syntax checker, preferably as an eclipse plugin, preferably be able to sort of compile it(at least find undefined variables in addition to syntax checking. Does such thing exist?

Junba Tester
- 801
- 2
- 9
- 15
2
votes
2 answers
Need Java Editor Written in JavaScript
I am writing a an interface for a web application that requires a user to write a small blob of Java in a JavaScript text area. I would like to know if there exists an editor written in JavaScript that can do Java syntax checking? Google searches…

DRaehal
- 1,162
- 9
- 16
2
votes
4 answers
Flymake complains X is not available even when configured not to use X
Running the Flymake mode in a text-mode console Emacs session, how can I tell Flymake to display its messages in the text console instead of trying to communicate with X?
Emacs 23 running on various environments, including Debian and Ubuntu.
I have…

bignose
- 30,281
- 14
- 77
- 110
2
votes
3 answers
Could syntax check for your code be taken as distinct step?
I've had a dispute with some colleges on should I take a syntax check after every code modification as a distinct step or I'd better rely on unit tests to catch possible syntax breakage ... ( of course unit tests do that ).
This is not a question…

Alexey Melezhik
- 962
- 9
- 27
2
votes
1 answer
Visual studio is syntax checking my C# as Visual Basic
I've been testing some c# code in visual studio and when I opened visual studio this morning my project was full of red lines.
Demanding class declarations to be closed with End class
Red lines under semicolons
Variable declaration without an AS…

Stian
- 57
- 1
- 6
2
votes
3 answers
Check if a string is valid PHP code
I want to do:
$str = " echo 'abcd'; ?>";
if (is_valid_php($str)){
echo "{$str} is valid";
} else {
echo "{$str} is not valid PHP code";
}
Is there a simple way to do the is_valid_php check?
All I can find is online php syntax checkers and…

Reed
- 14,703
- 8
- 66
- 110